Publisher review: Bitcnt_1.C - Count bits in a number (fast, clever) The loop will execute once for each bit of x set, this is in average twice as fast as the shift/test method.
Bitcnt_1.C is a C/C++ script for Snippets scripts design by Bob Stout.
It runs on following operating system: Windows / Linux / BSD / Solaris. Bitcnt_1.C - Count bits in a number (fast, clever)