Re: kickass optimizing compilers?

Robert Knighten <Robert@Knighten.org>
17 Jan 2004 23:26:18 -0500

          From comp.compilers

Related articles
[3 earlier articles]
Re: kickass optimizing compilers? walter@bytecraft.com (Walter Banks) (2004-01-12)
Re: kickass optimizing compilers? jvorbrueggen@mediasec.de (Jan C.=?iso-8859-1?Q?Vorbr=FCggen?=) (2004-01-12)
Re: kickass optimizing compilers? andrew@codeplay.com (Andrew Richards) (2004-01-12)
Re: kickass optimizing compilers? vanevery@indiegamedesign.com (Brandon J. Van Every) (2004-01-16)
Re: kickass optimizing compilers? colohan+@cs.cmu.edu (Christopher Brian Colohan) (2004-01-16)
Re: kickass optimizing compilers? Jeffrey.Kenton@comcast.net (Jeff Kenton) (2004-01-16)
Re: kickass optimizing compilers? Robert@Knighten.org (Robert Knighten) (2004-01-17)
Re: kickass optimizing compilers? walter@bytecraft.com (Walter Banks) (2004-01-18)
Re: kickass optimizing compilers? db@digital.com (dablick) (2004-02-01)
Re: kickass optimizing compilers? blitz@bad-logic.com (2004-02-04)
Re: kickass optimizing compilers? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-02-08)
Re: kickass optimizing compilers? vidar@hokstad.name (2004-02-08)
Re: kickass optimizing compilers? vbdis@aol.com (2004-02-12)
| List of all articles for this month |

From: Robert Knighten <Robert@Knighten.org>
Newsgroups: comp.compilers
Date: 17 Jan 2004 23:26:18 -0500
Organization: Posted via Supernews, http://www.supernews.com
Keywords: optimize
Posted-Date: 17 Jan 2004 23:26:18 EST

Brandon J. Van Every wrote:
> Much has been said over the years that oh, compilers will generate
> code better than humans can, but as an ASM jock for 11 years I've
> never seen it.
....
> [This has come up before. It is indeed usually possible for hand
> written code to beat compilers on small routines, but compilers have
> the advantage that when you give them 100,000 lines of code to
> translate, their eyes don't glaze over. -John]


There is also a matter of context. Years ago I worked on an Ada
compiler that was required to generate code that was within 10% of the
performance of the best hand coded assembler that our customer could
produce. The customer produced a modest number of relatively small
Ada programs as the benchmarks. And in due time they sent us the
assembler versions of the programs. When the performance between
these and the compiled versions were compared, the assembler version
won by perhaps 5 to 1. The immediate result was panic on the part of
our senior management!


But as part of writing Ada compilers, we engineers had also become
quite expert language lawyers and quickly wrote a report for our
customer in which we pointed out the many ways in which the assembly
language code we had been given did not come even close to
representing the Ada programs. Over the next few months we
occasionally received new assembly language versions. Each was slower
than the last, and none was quite right. In the meanwhile the code
produced by our compiler was getting better. Eventually we got code
from the customer that was very close to being a correct translation,
and was actually slower than the code generated by the compiler :-).
We were happy, the customer declared itself happy, and I never had to
meet the ASM jock who had that thankless task for those many months
:-).


Of course the very fast assembler code that was first delivered had
certainly capture the spirit of the benchmarks!
--
Robert L. Knighten
Robert@Knighten.org
[Well, yeah, if my code doesn't have to get the right answer, I can make
it as fast as you want. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.