scandum/binary_search
View on GitHub ↗ ★ 685 C
A collection of improved binary search algorithms.
5 mentions on Hacker News by 5 people: 1 story, 4 comments · first 2020-07-19 · latest 2025-04-29
20082026
-
…to encourage the compiler to emit a conditional move to skip a branch to see which is faster: https://github.com/scandum/binary_search My guess is the cmov version will win. I assume merits a bug report, although I suspect improving this…
comment by ryao · 2025-04-29 · in Migrating away from Rust -
Related repository of interest: https://github.com/scandum/binary_search "The most notable variant, the monobound binary search, executes two to four times faster than the standard binary search on arrays smaller than 1 million 32 bit…
comment by BoingBoomTschak · 2024-11-21 · in Fastest Branchless Binary Search -
…it makes it hard to understand _why_ it's faster. PS. Looking at "boundless interpolated search" ( https://github.com/scandum/binary_search/blob/master/binary-... ), it seems it's missing a `++checks`. I initially thought this could be the…
comment by pbiggar · 2020-07-20 · in Binary Search: A new implementation that is up to 25% faster -
The readme doesn't describe why it's faster. Looking at the code of the variant that is the fastest: https://github.com/scandum/binary_search/blob/master/binary-... It seems like it's a quaternary search which seems like an arbitrary…
comment by ghj · 2020-07-20 · in Binary Search: A new implementation that is up to 25% faster -
▲ 171
Binary Search: A new implementation that is up to 25% fasterstory by scandum · 2020-07-19 · 54 comments