Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
infiniteburp
· 14y ago · 0 comments
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.
Comments
[–]
Someone
14y ago
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".