🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1915

Re: Aggressive optimization

#1915
From: David Chase
Date: Tue, 06 Nov 1990 01:21
40 lines
2537 bytes
pcg@cs.aber.ac.uk (Piercarlo Grandi) writes:
> Point taken. However, *you* (not you personally, of course) are
> proposing new untried and potentially hazardous technology. The burden
> of proof in on you and your customers. If one believes without proof, in
> the presence of arguments that counsel diffidence, amen.

I don't think that the technology is as new or untried as you seem to
think.  The dependence-based code manglers use information that is
gathered (for Fortran, at least) in a reliable fashion (for C, it's
not clear how much useful information there is without either pragmas
or inlining), and has been used in "vectorizers" and "parallelizers"
for about the last ten years.  There's been plenty of proofs to show
that dependence information means what it claims to mean.

The set of optimizations that one hopes a modern compiler would
perform (e.g., strength reduction, constant propagation, hoisting of
loop invariant code, register allocation, reassociation, linear
function test replacement) have also all been around for some time,
and thus are not untried, and are no more "potentially hazardous" than
scanning and parsing.  (Read on for a code size comparison.)

> For starters I produce the general principle that a bigger and more
> complicated program, unless proven otherwise, has to be presumed to be
> buggier.

Agreed, generally true.  A quick glance around the programs that I run
every day reveals that the (text of the) optimizer (for C, Fortran,
Pascal, and Modula-2) is smaller (often by an order of magnitude) than
vmunix, gnuemacs, dbx, cfront, and several language front ends.  So,
should I worry more about bugs in the front ends, bugs in the editor,
bugs in the OS, bugs in the debugger, or bugs in the optimizer?

Although, if people cared that much more about reliability than they
do about speed, I think we'd see a lot more people programming in
languages other than Fortran, C, and C++.  Of course, that's another
discussion, but it probably gives some indication of what people
expect from their compilers (besides perfection, of course).

David Chase
Sun Microsystems
Technical Details
Message-ID: <2182@exodus.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!sun-barr!newstop!exodus!rbbb.Eng.Sun.COM!chased
References: numerous

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!sun-barr!newstop!exodus!rbbb.Eng.Sun.COM!chased
From: chased@rbbb.Eng.Sun.COM (David Chase)
Newsgroups: comp.lang.misc
Subject: Re: Aggressive optimization
Message-ID: <2182@exodus.Eng.Sun.COM>
Date: 6 Nov 90 01:21:12 GMT
References: numerous
Sender: news@exodus.Eng.Sun.COM
Organization: Sun Microsystems, Mt. View, Ca.
Lines: 40