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

A "branch" here is a conditional jump. This has the issues the article mentions, which branchless programming avoids:

    Again, there is no branching - the instruction pointer isn't manipulated, there's no branch prediction involved, no instruction cache to invalidate, no nothing.
This has nothing to do with whether the behaviour of some instruction depends on its arguments. Looking at the Microsoft compiler output from the article, the iadd (signed add) instruction will get different results depending on its arguments, and the movc (conditional move) will store different values depending on its arguments, but after each the instruction pointer will just move onto the next instruction, so there are no branches.


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

Search: