← Back to context

Comment by dahart

1 year ago

> For want of a better term, I've called this Zigzag order.

I learned this has a technical name: the zigzag order is called “Boustrophedonic”, after the Ancient Greek tablets where they wrote right-to-left on one line, then left-to-right on the next. https://en.wikipedia.org/wiki/Boustrophedon

It totally depends on the specifics of your application, but a little while ago, I compared Hilbert to both Boustrophedonic and Morton order, and surprisingly, Boustrophedonic was the winner. My application was partitioning a 3d grid into blocks of active voxels where each block could be represented efficiently with only a range (pair) of indices. It’s surprising at first that the zig-zag sometimes has better locality than Hilbert or Morton.

Right-to-left and left-to-right is how hand-knitting charts are read. But also bottom to top!