Very neat. For more on this check out the wikipedia article on Morton order curved (http://en.wikipedia.org/wiki/Z-order_(curve))
"As an alternative, the Hilbert curve has been suggested as it has a better order-preserving behaviour, but here the calculations are much more complicated, leading to significant processor overhead."