From: martin DOT kahlert AT keksy DOT mchp DOT siemens DOT de (Martin Kahlert) Newsgroups: comp.os.msdos.djgpp Subject: Re: (none) Date: 11 Jul 1997 06:39:33 GMT Organization: Siemens Inc. Lines: 14 Message-ID: <5q4kf5$roo$1@salomon.mchp.siemens.de> References: Reply-To: Martin DOT Kahlert AT mchp DOT siemens DOT de NNTP-Posting-Host: keksy.mchp.siemens.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article , "Chirayu Krishnappa (chirayu AT poboxes DOT com)" writes: > > hi, > > i need to find out if a 4 byte (default) integer has an even number of 1's > in its binary representation or not. I need to operate on 15Mb data and do > it fast. shifts (<<) and & is quite slow. is there some lib. function to > do this? what is the fastest way to get it done? > > thanks. Why not making a lookup-table for one byte and adding the 4 values up? Martin.