Is Morton code the most efficient for higher dimensions?
Asked Answered
I

1

7

For my current input data, which is points in 3D, I'm using Morton code to improve the cache coherence when accessing the point list.

I have some other data that is 6D and 7D. Is Morton code still a good technique for such dimensions? Or are there any other techniques? The other space filling curve techniques were more complex to compute than Morton in 3D itself, I'm wondering if folks use an alternative technique for 6D/7D or higher.

Illegal answered 15/4, 2014 at 9:47 Comment(0)
E
8

You should try row-major or row-prime indexing. They also preserve spatial locality, but they can be computed more efficiently, even in higher dimensions.

You can read about row-major and column-major indexing in deeper detail (but in less geometrical sense) in the book The Art of Assembly Language, chapter 5, page 211-216. The relevant chapter is available online here.

And there is a good paper about various spatial indexing techniques you can consider, including the mentioned ones: Samet, H. 2017. Sorting Spatial Data. The International Encyclopedia of Geography. 1–11.

Hilbert and Gray index are not an option here, since they are slower to compute than Morton (most implementations of them contain an implicit Morton encoding). Basically a proper Morton (lookup-table or magic numbers based) implementation, and the row-major/column-major indexing are the fastest.

Erund answered 2/7, 2015 at 2:21 Comment(3)
@Bytemain How is this better from what? For a comparison, you need two things.Erund
@Bytemain A downvote is not the smartest way to overcome a question addressed to you.Erund
@Bytemain I suggest you to remove your downvotes on my other questions, which you made without any reason, otherwise I will contact a moderator.Erund

© 2022 - 2024 — McMap. All rights reserved.