News for hackers. Stuff that matters.
Re:Calculating integer factorials in constant time, taking a... by uxcn on Tuesday December 15, 2015 @01:35PM (#10739502)
On x86, it could also compile down to just a jmp. A bsr would still be faster, but it would probably be worth checking that __builtin_clz actually compiles down to bsr.

For portability reasons, it might be better just using bit tricks and letting the compiler try to optimize it though. Clang and GCC do pretty well here.

There are no comments on this comment yet.