On Wednesday, 2 November 2016 at 15:15:18 UTC, Andrea Fontana wrote:
Why don't you perform a binary search over 200 power of 2?

Something like: http://paste.ofcode.org/scMD5JbmLMZkrv3bWRmPPT

I wonder if a simple binary search on whole array is faster than search for limits as in this example

PS: If you need ceil, just use the else branch with <= instead of <.

Andrea

Reply via email to