Bitwise Binary Search: Elegant and Fast
orlp.net
orlp.net
Clang has `__builtin_unpredictable`[^1]. Both of the have `__builtin_expect_with_probability` [^2], which could help. But these builtins are fickle/make no guarantees as far as I can tell.
[^1] https://clang.llvm.org/docs/LanguageExtensions.html#builtin-... [^2] https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index...
[^1] https://reviews.llvm.org/D36858 [^2] See: - https://groups.google.com/g/llvm-dev/c/qwogIiwHCAc/m/lSP1jh2... - https://groups.google.com/g/llvm-dev/c/qwogIiwHCAc/m/EAt643e...