I've read that space-filling curves such as the Peano curve are useful for maintaining cache-friendly data structures in a linear address space, since they maintain physical spatial locality.
However, I'm not sure how to actually use them. Do any of these curves have formulas for quickly translating a linear address into (x,y) coordinates and vice-versa? Otherwise, how do I determine where in memory to look when looking up a certain pair of coordinates? An example would be very helpful.