Re:Low Level Bit Hacks You Absolutely Must Know
by hedora on Sunday May 13, 2018 @03:02PM
(#17060380)
The “clear the bottom bit” hack is pretty cool. It’s sometimes faster to roll a loop that uses that than to invoke the GCC popcnt intrinsic. If you pass an -march parameter that lets GCC emit the intended intel assembly instruction, then the intrinsic seems to always win (as expected!)
[ Parent
| on HN ]
There are no comments on this comment yet.