News for hackers. Stuff that matters.
Re:Three Optimization Tips for C++ by axylone on Wednesday May 07, 2014 @08:36PM (#7713376)
If the branch is predictable, and the cpu guesses correctly, then it is faster than integer arithmetic.

A branch miss on the other hand is much more expensive, about 14 cycles last time I was testing (on a core i5 desktop cpu from a few years ago).

There are no comments on this comment yet.