logoalt Hacker News

taericyesterday at 2:51 PM2 repliesview on HN

If you are talking smaller arrays, linear search with a sentinel value at the end is already tough to beat. The thing that sucks about that claim, is that "smaller" is such a nebulous qualifier that it is really hard to internalize.


Replies

rao-vyesterday at 3:09 PM

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.

show 4 replies
SuperV1234yesterday at 3:10 PM

That's not what the article is about.