You’re a busy person so I’ll first jump right to it. Here it is, the fastest general (and simple) binary search C++ implementation: template <class ForwardIt, class T, class Compare> constexpr ForwardIt sb_lower_bound( ForwardIt first, ForwardIt last, const T& value, Compare comp) { auto length = last - first; while (length > 0) { auto rem = length % 2; length /= 2; if (comp(first[length], value))

