[Xorp-cvs] XORP cvs commit: xorp/libxorp
Pavlin Radoslavov
pavlin@icir.org
Wed, 5 Apr 2006 05:40:18 GMT
CVSROOT: /usr/local/share/doc/apache/cvs
Module name: xorp
Changes by: pavlin@xorpc.icir.org 2006-04-05 05:40:18 UTC
XORP CVS repository
Modified files:
libxorp utils.hh
Log message:
Add new function xorp_bitcount_uint32().
It can be used for fast counting the number of bits that are
set in a 32-bit wide integer.
Code taken from the following URL (the "Population Count (Ones Count)"
algorithm):
http://aggregate.org/MAGIC/
Note: this solution appears to be faster even compared to the
"Parallel Count" and "MIT HACKMEM Count" from:
http://www-db.stanford.edu/~manku/bitcount/bitcount.html
Obtained from: http://aggregate.org/MAGIC/
Revision Changes Path
1.15 +33 -1; commitid: 15ed6443357a27ea6; xorp/libxorp/utils.hh