BIT Counting: C programming problem

Andrew Hume andrew at alice.UUCP
Thu Jan 26 15:27:39 AEST 1989


> >[Barry Margolin suggests using a 64K lookup table for something.]
> >
> >That is a ridiculous idea.  For microscopic savings in speed, you
> >waste 63K of space...what if it needs 400K to run effectively, or 
> >even 640K...Besides, more and more people are going to multiprogramming 
> >environments, even on PCs, like Windows or DesqView.  


the time saving is not microscopic (i measure a 1.8x speedup between
8 bit lookup and 16 bit lookup) unless you don't call the bitcount
routine. i do not encourage mindless devouring of memory but i
figure that i don't much of a time tradeoff to worry about 64KB.



More information about the Comp.lang.c mailing list