My contribution: http://sree.kotay.com/2007/04/shift-registers-and-de-bruijn-...
Re:EABitTricks.h
by maximilianburke on Monday December 19, 2022 @02:22PM
(#34056400)
(disclaimer: I used to work on these EA* libraries)
The intention of EAStdC wasn't really to replace the platform libc but to augment it with portable implementations that had consistent behavior across the different platforms, as well as have some opt-in performance improvements (like a memcpy that used VMX), while also not polluting the global (C) namespace.
For anyone interested in this sort of stuff and isn't yet aware of the 'bit twiddling hacks' collection:
https://graphics.stanford.edu/~seander/bithacks.html
Also regarding the bit counting function:
Some compilers go as far as detecting the 'bit twiddling' version and replace that with a popcnt instruction:https://www.godbolt.org/z/bExMvfzEx