Related articles |
---|
Grammars for future languages schinz@guano.alphanet.ch (1995-10-22) |
Re: Grammars for future languages sethml@dice.ugcs.caltech.edu (1995-11-21) |
Re: Death by error checks. hbaker@netcom.com (1995-12-19) |
heuristic optimizations [was "Death by error checks."] mcintosh@rice.edu (1995-12-19) |
Why heuristic optimization is wrong. cef@geodesic.com (Charles Fiterman) (1995-12-20) |
From: | mcintosh@rice.edu (Nathaniel McIntosh) |
Newsgroups: | comp.compilers |
Date: | 19 Dec 1995 23:11:56 -0500 |
Organization: | owlnet.rice.edu |
References: | 95-10-103 95-11-192 95-12-113 |
Keywords: | optimize |
In-reply-to: | hbaker@netcom.com's message of 19 Dec 1995 13:16:03 CST |
hbaker@netcom.com (Henry Baker) writes:
|This is why a lot of the 'heuristic' optimizations found in compilers
|work mainly for the standard benchmarks and some of the compiler
|vendor's internal code, (or for some of the compiler vendor's most
|favored customers!), but are pretty much a waste of effort for nearly
|every one else.
I agree that there are many optimizations based on heuristics, and
that every heuristic will probably break down in certain situations.
I think it would probably be a mistake to do away with all
heuristic-based optimizations, however. A good global register
allocator would be one example of a optimization that I'd rather not
do without. Sure, it's based on heuristics, but the benefits greatly
outweigh the drawbacks (at least for most of the code I write).
I think that the reason why some optimizations fail so spectacularly
is that it's very difficult to develop "good" heuristics for them.
Loop unrolling is one example that springs to mind. A good heuristic
to determine how much and when to unroll is incredibly difficult to
develop. This doesn't seem to stop compiler writers, however, since as
you point out, even a sloppy implemenation will probably improve
performance for the SPEC benchmarks.
Nat
--
Nathaniel McIntosh | Department of Computer Science
mcintosh@cs.rice.edu | Rice University, Mail Stop 41
n.mcintosh@ieee.org | 6100 South Main, Houston, TX 77005 USA
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.