Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!uflorida!gatech!bloom-beacon!adam.pika.mit.edu!scs From: scs@adam.pika.mit.edu (Steve Summit) Newsgroups: comp.lang.c Subject: Re: BIT Counting: C programming problem Message-ID: <8767@bloom-beacon.MIT.EDU> Date: 15 Jan 89 00:50:37 GMT References: <225@tityus.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: scs@adam.pika.mit.edu (Steve Summit) Distribution: na Lines: 23 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@adam.pika.mit.edu