1994-07-07 - Re: Counting bits

Header Data

From: “Perry E. Metzger” <perry@imsi.com>
To: gtoal@an-teallach.com (Graham Toal)
Message Hash: 26d191e195fb2206591a59c58e39212f416384803a48e2ddb0c3833e88487adf
Message ID: <9407071337.AA03454@snark.imsi.com>
Reply To: <199407071330.OAA05787@an-teallach.com>
UTC Datetime: 1994-07-07 13:38:06 UTC
Raw Date: Thu, 7 Jul 94 06:38:06 PDT

Raw message

From: "Perry E. Metzger" <perry@imsi.com>
Date: Thu, 7 Jul 94 06:38:06 PDT
To: gtoal@an-teallach.com (Graham Toal)
Subject: Re: Counting bits
In-Reply-To: <199407071330.OAA05787@an-teallach.com>
Message-ID: <9407071337.AA03454@snark.imsi.com>
MIME-Version: 1.0
Content-Type: text/plain



Graham Toal says:
> Serious optimization isn't a child's game.  When we did the 1's-counting
> code for the Acorn RISC machine, every programmer in the office worked
> on it for a week.  I think the best version in the end was a variation
> of the trick shown earlier and some sneaky use of ARM conditionals and
> address-loading instructions that could do arbitrary shifts on the fly
> while adding.

In my humble opinion, the right way to get code like this written is
to let a superoptimizer get a whack at the problem -- superopts
produce are guaranteed to produce optimal code, and its better to have
fifteen machines grinding for a week than fifteen humans and their
machines.

Perry





Thread