Bit counting

Rich Neitzel thor at stout.ucar.edu
Wed Jan 11 06:12:09 AEST 1989


BTW, I just saw a posting of the 'and' algorithm for bit counting. It
suffers from the same problem as the classic shift - it loops 
repeatedly for cases of multiple set bits. I have also tested this and
find pair addition faster.

-------------------------------------------------------------------------------

			Richard Neitzel
			National Center For Atmospheric Research
			Box 3000
			Boulder, CO 80307-3000
			303-497-2057

			thor at thor.ucar.edu

    	Torren med sitt skjegg		Thor with the beard
    	lokkar borni under sole-vegg	calls the children to the sunny wall
    	Gjo'i med sitt shinn		Gjo with the pelts
    	jagar borni inn.		chases the children in.




-------------------------------------------------------------------------------



More information about the Comp.lang.c mailing list