Hacker News new | ask | show | jobs
by infiniteburp 5201 days ago
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.
1 comments

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".