Bit Twiddling Hacks (2009)
graphics.stanford.edu
Bit Twiddling Hacks (2009)
1–10 of 28 posts
Re: Bit Twiddling Hacks (2009)
#20. Hacker's Delight (Second Edition) by Henry S. Warren, 2013, ISBN: 0321842685
Re: Bit Twiddling Hacks (2009)
#3Re: Bit Twiddling Hacks (2009)
#4This thing is posted so often on HN. Does anyone have any new cool tricks that aren't in the normal compendium of tricks?
Where these tricks become handy again is SIMD vectorization. The compiler is much less clever in these situations and the scalar bit-twiddling instructions often don’t have vectorized equivalents.
Re: Bit Twiddling Hacks (2009)
#5Re: Bit Twiddling Hacks (2009)
#6This thing is posted so often on HN. Does anyone have any new cool tricks that aren't in the normal compendium of tricks?
shr ecx, 1 lea eax, [rcx + 1FC00000h] shr eax, 1 add eax, ecx
Re: Bit Twiddling Hacks (2009)
#7This thing is posted so often on HN. Does anyone have any new cool tricks that aren't in the normal compendium of tricks?
Re: Bit Twiddling Hacks (2009)
#8https://en.wikipedia.org/wiki/X86_Bit_manipulation_instructi...
https://thephd.dev/_vendor/future_cxx/papers/C%20-%20Modern%...
Re: Bit Twiddling Hacks (2009)
#9with this bitwise magic, my code will find the sign faster than you can say "boolean operation!" who needs branching when you've got clever tricks up your sleeve? hate to say it, but this beats the obvious way, hands down!