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

> Avoiding either > Easily predicted branch

Branchless code can easily out-cost a well-predicted branch (and its content if any).



This is where I was trying to use sorting networks as a fun example. Without independent compare/swap units, they will go slower than sequential sorting. Despite not necessarily "branching."


Of course, perhaps this should be reduced to "keep an eye out for silly branches"




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

Search: