News for hackers. Stuff that matters.
Re:Binary Search: A new implementation that is up to 25% faster by hansvm on Monday July 20, 2020 @03:08PM (#23900879)
A levelwise traversal usually performs well without much effort if you want to optimize for cache friendliness. It's not optimal iirc, but it's dead-simple and much easier on the prefetcher than an inorder traversal.

Edit: Oops, TIL the eytzinger layout other comments have mentioned _is_ a levelwise traversal. Anywho, it's usually a good starting point for this kind of thing.

There are no comments on this comment yet.