←back to thread

170 points judicious | 1 comments | | HN request time: 0.212s | source
1. dehrmann ◴[] No.45409917[source]
Shameless plug, but a while back, I implemented a "branchless" (I think it actually branches, but not in the usual sense) binary search in C. It was just a POC to see if 1) 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