As instructed by the first lesson of the book Understanding Algorithms, we must create a binary search that uses the "divide to conquer" method to ...
For further actions, you may consider blocking this person and/or reporting abuse
For large lists the difference really is massive. I implemented the linear scan from your post, the binary search from your post, and the branchless binary search from mhdm.dev/posts/sb_lower_bound/ and when searching a list of 500 million for page 490 ish million, the linear search takes 0.85 seconds while the binary searches take 4 and 1 micro(!) seconds respectively.
great! thank you for taking a time to test the code and read the article
Cheers! Forgot to mention btw that I reimplemented in C but I think that's only relevant for the branchless version.