ehrmann/branchless-binary-search
View on GitHub ↗ ★ 10 C
Binary search implementation that avoids branch instructions
4 mentions on Hacker News by 1 person: 0 stories, 4 comments · first 2020-07-20 · latest 2025-09-29
20082026
-
…I could be clever enough with bitwise operators to do it and 2) someday write a SIMD binary search. https://github.com/ehrmann/branchless-binary-search
comment by dehrmann · 2025-09-29 · in The Weird Concept of Branchless Programming -
…change the result, you can use a switch fallthrough to "unroll" the loop and not have to branch. https://github.com/ehrmann/branchless-binary-search/blob/mas...
comment by dehrmann · 2023-08-11 · in Fastest branchless binary search -
Shameless plug of my attempt at this: https://github.com/ehrmann/branchless-binary-search
comment by dehrmann · 2023-04-28 · in Beautiful branchless binary search -
…with SIMD instructions. I think I was able to get it with some optimizer flags and GCC built-ins. https://github.com/ehrmann/branchless-binary-search
comment by dehrmann · 2020-07-20 · in Binary Search: A new implementation that is up to 25% faster