3 ms·
That one’s cache-oblivious so nominally the right answer if you don’t know how your cache works or have to deal with several of them at once, but the constants
by mananaysiempre 3mo ago
That one’s cache-oblivious so nominally the right answer if you don’t know how your cache works or have to deal with several of them at once, but the constants are bad enough to make it impractical[1,2].
Personally I’ve been on the lookout for a good vEB implementation for a while: there’s like one of them on the whole Internet, and it does things like recurse while figuring out where the next node down is, so no wonder it’s slow; and when I look at the definitions myself I can’t really figure out a faster way of doing it either.
[1] http://arxiv.org/abs/1509.05053 http://arxiv.org/abs/1509.05053
[2] https://espindo.la/posts/array-layouts.html https://espindo.la/posts/array-layouts.html