Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: