Path: utzoo!attcan!uunet!lll-winken!ames!ncar!stout!thor From: thor@stout.ucar.edu (Rich Neitzel) Newsgroups: comp.lang.c Subject: Re: Bit counting Message-ID: <1210@ncar.ucar.edu> Date: 10 Jan 89 20:12:09 GMT References: <1208@ncar.ucar.edu> Sender: news@ncar.ucar.edu Reply-To: thor@thor.UCAR.EDU (Rich Neitzel) Organization: Field Observing Facility, NCAR, Boulder, CO Lines: 24 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@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. -------------------------------------------------------------------------------