A practical use for space-filling curves
Another good example is using Morton Order for things like texture maps in graphics - it is easy to derive a memory address by interleaving the bits of the x,y coords:<p><a href="http://www.devmaster.net/forums/showthread.php?t=10125" rel="nofollow">http://www.devmaster.net/forums/showthread.php?t=10125</a><p><a href="http://en.wikipedia.org/wiki/Z-order_curve" rel="nofollow">http://en.wikipedia.org/wiki/Z-order_curve</a><p>From distant memory - switching to a variant of this from simple row major order textures gave > 20% increase in a scene rendering benchmark (software pipe, full scene, no game logic). Prior to that I had been doing daft things like having textures stored in column or row major order depending on their 'usual' orientation.