popcount

popcount is a function that returns the number of 1-bit in a bit vector. It is implemented in x86-64 instruction set and the software implementation is trivial (but not necessarily fastest). [more]

Binary Tricks

These are some binary tricks that I collected on the web. Useful or not. Some of them are the reinventing-the-wheel product of mine. But it is nice to keep a record here. [more]