From: | lehotsky@tiac.net (Alan Lehotsky) |
Newsgroups: | comp.compilers,comp.lang.asm.x86 |
Date: | 20 Jun 1997 21:41:39 -0400 |
Organization: | Quality Software Management |
References: | 97-06-071 |
Keywords: | assembler, optimize |
>>>I was thinking about the assertion 'a good optimizing compiler will
>>>nearly always outcode a moderately proficient assembly programmer'.
Let me add an anecdote on this topic.
Dave Cutler was the Chief Architect of Digital's VMS. He's also the
guy responsible for the design of Windows/NT.
Dave was one of the must incredible assembly-language coders I have
ever seen; he was incredibly prolific and generated very clever code.
Large portions of VMS were written in Bliss (a language designed
around the goal of writing optimizing compilers). The VMS library
routine fao (formatted ascii output, essentially printf()) was written
in Bliss.
Dave decided that it was TOO big, and slow, so he rewrote it in
assembly language. The version he checked in was something like 12
bytes LARGER than the compiler-generated code AND it had two bugs that
were later uncovered.
My contention is that a good programmer with an optimizing compiler
will usually beat a very good assembly language programmer in all but
the most restrictive environments (e.g. real time, limited memory and
or REALLY bizarre architectures like DSPs).
Remember that programmer time is USUALLY the quantity that is most
expensive, and in least supply. Besides there just aren't that many
assembly language programmers who really do know what they're doing!
[I've also seen the inside of FOROTS (the DEC-10 Fortran runtime
written by Ed Yourdon.)..it's not a pretty sight....
I on the other hand have the advantage of relative obscurity;
very few people are likely to remember what the code I write looks
like :-)]
-- Al Lehotsky
[Oh yeah? The elephant never forgets. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.