Counting Bits

SINCLAIR DOUGLAS N sinclai at ecf.toronto.edu
Thu Jul 7 01:20:21 PDT 1994


The only sane way to count the number of 1 bits in a byte is to use
a lookup table:

	return table[result];

On an intel chip this produces ONE opcode:

	XLAT



More information about the cypherpunks-legacy mailing list