Mail Archives: djgpp/1997/07/12/08:33:54
In article <Pine DOT SV4 DOT 3 DOT 93 DOT 970710151909 DOT 18181A-100000 AT giasbga>,
"Chirayu Krishnappa (chirayu AT poboxes DOT com)" <chirayu AT giasbga DOT vsnl DOT net DOT in> 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.
- Raw text -