|Grammars for future languages email@example.com (1995-10-22)|
|Re: Grammars for future languages firstname.lastname@example.org (1995-11-21)|
|Re: Death by error checks. email@example.com (1995-12-19)|
|heuristic optimizations [was "Death by error checks."] firstname.lastname@example.org (1995-12-19)|
|Why heuristic optimization is wrong. email@example.com (Charles Fiterman) (1995-12-20)|
|From:||firstname.lastname@example.org (Nathaniel McIntosh)|
|Date:||19 Dec 1995 23:11:56 -0500|
|References:||95-10-103 95-11-192 95-12-113|
|In-reply-to:||email@example.com's message of 19 Dec 1995 13:16:03 CST|
firstname.lastname@example.org (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.
Nathaniel McIntosh | Department of Computer Science
email@example.com | Rice University, Mail Stop 41
firstname.lastname@example.org | 6100 South Main, Houston, TX 77005 USA
Return to the
Search the comp.compilers archives again.