Hi! This is great stuff.
I've written a few asm loops in order to use bit-twiddling
instructions. The ones you listed cover all of those.
One other thing to consider is rotate. The compiler does a good job of
recognizing constant rotates and it's getting better
(https://github.com/golang/go/issue
Hello!
I'm working on a proposal for a compiler/hardware supported bittwidling
API. See discussion at https://github.com/golang/go/issues/17373. The
current set of functions I have in mind are: count trailing zeros, count
leading zeros, byte swap and population count for 32 and 64 bits integers