From: Andrew Crabtree Message-Id: <199707101349.AA237002579@typhoon.rose.hp.com> Subject: Re: your ma To: chirayu AT giasbga DOT vsnl DOT net DOT in (Chirayu Krishnappa) Date: Thu, 10 Jul 1997 6:49:39 PDT Cc: djgpp AT delorie DOT com In-Reply-To: ; from "Chirayu Krishnappa" at Jul 10, 97 3:21 pm Precedence: bulk > 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? The only way I can think of to do this is to use the parity flag (Pentiums still have that - right :). I think (really not sure here), that if you so hat a bit of inline assembly that does an OR of the value with itself and the a jump on parity that should do the trick. HTH Andrew