Then interleave those bits. Liked this? Share it with a data engineer who still uses nested loops.
You’ve heard of a heat map, a choropleth map, and a tree map. But the Superman Map (formally known as the Z-order curve or Morton order ) is the secret weapon of database engineers, game developers, and GIS specialists.
Point A at (3,4) and Point B at (4,3) are extremely close. But on a Superman Map, they might be in entirely different quadrants of the curve.
Because the path zigs and zags, two points that are close in straight-line distance might be far apart on the Z-curve if they fall on opposite sides of a "Z boundary."