Why is processing a sorted array faster than an unsorted array? (stackoverflow.com)
recommended by 4 users | 2012 | 590 points by ashishgandhi | performance | original thread |
4 users recommended this thread. What they said:
bonobo Jan 13, 2013 | on: How to determine if my calculation of pi is accurate? | context

This one[1][2] is the only one that I remember seeing his name, but it's a very good one. In his answer he explains branch prediction, and ended up receiving more than 5000 upvotes for it.

[1] http://news.ycombinator.com/item?id=4637196

[2] http://stackoverflow.com/a/11227902/240905 (direct link to his answer)

ColinWright Apr 8, 2014 | on: Why is processing a sorted array faster than an unsorted… | context

It's a wonderful piece. Well written, well constructed, and immensely informative for those new to the details of the internals of CPUs. Perhaps it deserves to be submitted every month or so. In some sense, seeing it surface yet again gives me hope that there are still people on HN who crave discussions about technical issues.

In case you think that the people here are intelligent and might have something to add, here is the previous discussion of this:

https://news.ycombinator.com/item?id=4637196 <- Most comments

https://news.ycombinator.com/item?id=5960299 <- More comments

For those complaining that it seems to be posted regularly, here are some of the previous submissions:

https://news.ycombinator.com/item?id=4167834

https://news.ycombinator.com/item?id=4170972

https://news.ycombinator.com/item?id=4185226

https://news.ycombinator.com/item?id=4355548

https://news.ycombinator.com/item?id=4964931

https://news.ycombinator.com/item?id=5167935

https://news.ycombinator.com/item?id=5666751

https://news.ycombinator.com/item?id=5679080

https://news.ycombinator.com/item?id=6732689

https://news.ycombinator.com/item?id=6739947

https://news.ycombinator.com/item?id=6831202

https://news.ycombinator.com/item?id=6995154

https://news.ycombinator.com/item?id=7005187

https://news.ycombinator.com/item?id=7029578

https://news.ycombinator.com/item?id=7247337

https://news.ycombinator.com/item?id=7297196

https://news.ycombinator.com/item?id=7448337

There are more.

CarolineW Apr 20, 2016 | on: Why processing a sorted array is faster than processing an… | context

This is a fascinating article that I think should be submitted every six months or so. If you haven't read it, I strongly recommend that you do so.

The only substantial discussion on HN I could find is from 4 years ago: https://news.ycombinator.com/item?id=4637196

It would be interesting to know if anything has changed.

In case you're interested in checking for other comments on the topic (and there are a few here and there), here are some of the other submissions:

https://hn.algolia.com/?query=Why%20processing%20a%20sorted%...

negativity Oct 16, 2012 | on: Hacker News supports browsing with a points threshold | context