Re:Sorting in C++: 3 times faster than C
by infiniteburp on Saturday March 17, 2012 @09:33AM
(#3717023)
Loop unroll for limit branching.
You can sort what's in cache, then load a new chunk of data into cached and sort it ... then merge the sorted chunks.
[ Parent
| on HN ]
Sometimes, you can also get rid of branches by using arithmetic. For example, see http://stackoverflow.com/questions/1610836/branchless-code-t... or google "Branchless coding".