Log n isn’t constant


Reading memory allocator blog posts (because this is how I prefer to spend Saturday nights), I came across this well-put observation by Jason Evans 1:

In essence, my initial failure was to disregard the difference between a O(1) algorithm and a O(lg n) algorithm. Intuitively, I think of logarithmic-time algorithms as fast, but constant factors and large n can conspire to make logarithmic time not nearly good enough.

It rewards contemplation.