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

The operation being done based on the result matters - returning 0 or 1 can be done branchlessly, so it's worth making the whole operation branchless. However, if the operation requires a branch one way or another, both gcc and clang do branches for some of the intermediate checks:

https://cpp.godbolt.org/z/7j4qj1aPY



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

Search: