News for hackers. Stuff that matters.
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.
Re:Sorting in C++: 3 times faster than C by Someone on Saturday March 17, 2012 @09:58AM (#3717072)
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".