Hacker News new | ask | show | jobs
by bgwalter 434 days ago
That seems very likely. The benchmark should probably use a range that is guaranteed to be outside of the cached smallint range.
1 comments

Then you are back to what the article discusses. Each integer is in a separate box, those boxes are allocated in one order, sorting the array by value will shuffle it by address and it will be much slower. I tested this as well, see the other comment.