logoalt Hacker News

rao-vyesterday at 3:09 PM4 repliesview on HN

This is simply not true - if you look at this article’s excellent benchmarking, linear search falls behind somewhere around 200-400 elements.

In general I love this article, it took what I’ve often wondered about and did a perfect job exploring with useful ablation studies.


Replies

KalMannyesterday at 5:16 PM

I don't really see how this implies the above commenter's statement is "simply not true".

taericyesterday at 3:53 PM

I don't think std::find typically uses a sentinel, though?

BeetleByesterday at 3:28 PM

For that machine and compiler version, yes.

eggpricesyesterday at 3:12 PM

Except on Apple, where binary search always wins. Does anyone know why?

show 1 reply