delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/12/08:33:54

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: <Pine DOT SV4 DOT 3 DOT 93 DOT 970710151909 DOT 18181A-100000 AT giasbga>
Reply-To: Martin DOT Kahlert AT mchp DOT siemens DOT de
NNTP-Posting-Host: keksy.mchp.siemens.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019