Re: kickass optimizing compilers?

glen herrmannsfeldt <gah@ugcs.caltech.edu>
12 Jan 2004 13:21:30 -0500

          From comp.compilers

Related articles
kickass optimizing compilers? vanevery@indiegamedesign.com (Brandon J. Van Every) (2004-01-09)
Re: kickass optimizing compilers? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-01-12)
Re: kickass optimizing compilers? toon@moene.indiv.nluug.nl (Toon Moene) (2004-01-12)
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)
[8 later articles]
| List of all articles for this month |
From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 12 Jan 2004 13:21:30 -0500
Organization: Comcast Online
References: 04-01-044
Keywords: assembler, optimize
Posted-Date: 12 Jan 2004 13:21:30 EST

Brandon J. Van Every wrote:


> Can anyone point me at compilers that are considered "state of the
> art" for optimized ASM generation? I don't care what language, or CPU
> platform, or whether it's freely or commercially available, or even if
> it only exists in a lab.


> 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.
(snip)


The first compiler I heard this said of is the IBM S/360 Fortran H
compiler. I once knew someone with a homework assignment of coding a
simple Fortran loop in assembler in the fewest instructions. This
compiler beat his answer by one.


There were stories about the IBM 704 Fortran compiler. It had to be
good enough to convince people to use it instead of coding in
assembler (in the days when machine time was more expensive than
people time).


How do you define better? Fewest instruction? Fastest execution
time? A dynamic programming algorithm can find either, over an
arbitrary number of instructions, much faster than any human, given
the proper weights.


Other than that most RISC machines are designed for compiler generated
code, and not people generated code. I would say very few
instructions before a human gives up on hand coding.


-- glen


[Fortran H was state of the art in the 1960s, and was greatly improved
into the 1970s by a guy with little compiler background that
systematically went through identifying less than perfect code and
making the compiler do better, with a self-imposed limit that the
results had to remain bit-identical. It was a heck of a compiler, but
the machine model was much simpler, no cache, very short pipeline,
small or no branch penalty. Its descendant Fortran X is still around
for people who want to run Fortran on IBM mainframes, but it's now
considered a respectable but not cutting edge compiler and they haven't
bothered to port it to their 64 bit architecture. -John]



Post a followup to this message

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