News for hackers. Stuff that matters.
Re:Bit Twiddling Hacks by DarkShikari on Wednesday January 11, 2012 @08:44PM (#3454696)
min() is a special case: on most modern architectures (x86, ARM, etc), the naive code will compile optimally. Example on x86:

    cmp   eax, ebx
    cmovg eax, ebx
The compiler will likely not understand the insane bit-hack method, which is much more complicated, and thus not parse it into a simple cmov sequence.

There are no comments on this comment yet.