Why it matters
Bit hacks power tight loops and codecs. Understanding them saves branches and cycles.
Advertisement
The architecture
Branchless abs; branchless min/max; round-up to next pow2; bit-parallel byte swap.
Modern compilers may synthesize hacks automatically.
Advertisement
How it works end to end
Sean Anderson's page as reference.
Compiler autovectorization may compete.
Test edge cases carefully.