Earlier quoted context omitted.
The big advantage of Z-order curves is that the addressing computation is very cheap, which is why it's used a lot in computer graphics.
While I agree that Z-order curves are simpler, but it's fast to calculate Hilbert curves on modern CPUs too. Just to self plug: https://github.com/leni536/fast_hilbert_curve I only implemented the index->XY calculation yet. It compiles to 36 instructions without any branches and takes up 86 bytes. https://github.com/leni536/fast_hilbert_curve/wiki/How-effic... I think I can apply the same tricks for the inverse funct…
zorder64_inv:
movabsq $0x5555555555555555, %rax
pextq %rax, %rcx, %rdx
shrq %rcx
pextq %rax, %rcx, %rcx
shlq $32, %rcx
movl %edx, %eax
orq %rcx, %rax
retq
zorder64:
movl %ecx, %eax
movabsq $0x5555555555555555, %r8
pdepq %r8, %rax, %rcx
movl %edx, %eax
pdepq %r8, %rax, %rax
addq %rax, %rax
orq %rcx, %rax
retq