Re:Binary Search: A new implementation that is up to 25% faster
by utopcell on Monday July 20, 2020 @12:32AM
(#23894677)
It is nice to see benchmarks of elementary algorithms, but none of these is new. Benchmarking would be more convincing if more distributions were used. For example, we know that interpolated search is O(lglgn) for uniform distributions that are used here, but can be linear in pathological cases.
[ Parent
| on HN ]
Re:Binary Search: A new implementation that is up to 25% faster
by klyrs on Monday July 20, 2020 @09:17AM
(#23897492)
Exponentially distributed data is a great example of that. It's fun that the author picks 32-bit ints; I suspect that you just don't have enough dynamic range to really hobble interpolated search.
Re:Binary Search: A new implementation that is up to 25% faster
by michaelmior on Monday July 20, 2020 @09:07AM
(#23897395)
It would be interesting to see an analysis of interpolated search with other known but non-uniform distributions.