Another interesting way of encoding lists to have good locality is to use the Van Emde Boas layout.<p><a href="https://www.cs.au.dk/~gerth/papers/soda02.pdf" rel="nofollow">https://www.cs.au.dk/~gerth/papers/soda02.pdf</a>
I tried to make sense of this, but had a really hard time. Most of the code has bugs (where does the magic a[] come from? what the hell is n? oh it's supposed to be a.length?) and the concepts are not well thought out.<p>I can tell there's good substance inside, once you're can crack the nut, but this reads more like the author was trying to jot down a rough sketch of what was in his mind, rather than allow the readers to construct the same ideas and relationships in theirs.