BIT Counting: C programming problem

Steve Summit scs at adam.pika.mit.edu
Sun Jan 15 10:50:37 AEST 1989


Pathetically flogging his long-dead equine quadruped, the style
advocate tonelessly repeats his sad lament:

	"First code it in the obvious way, deferring any attempt
	at optimization until profiling demonstrates that the
	bit-counting code contributes significantly to
	unacceptable run time."

Judging from the attention these "cute problems" continually
receive here (last month it was finding the high-order bit), one
would have to conclude that virtually every C program requires
such arcane bit manipulations, and that infants would perish,
space shuttles crash, and empires topple if the answer were not
obtained in the absolute minimal, micro-optimized time.

The suggestions for 64K lookup tables had implied smiley faces, right?
Please?

(Smiley face here, too; I know we're all just having good, clean,
computer nurd fun.)

                                            Steve Summit
                                            scs at adam.pika.mit.edu



More information about the Comp.lang.c mailing list