Re: Optimizing Across && And ||

leichter@zodiac.rutgers.edu
Tue, 7 Mar 1995 16:19:05 GMT

          From comp.compilers

Related articles
[5 earlier articles]
Re: Optimizing Across && And || bart@cs.uoregon.edu (1995-02-23)
Re: Optimizing Across && And || bill@amber.ssd.csd.harris.com (1995-02-24)
Re: Optimizing Across && And || glew@ichips.intel.com (1995-02-27)
Re: Optimizing Across && And || bill@amber.ssd.csd.harris.com (1995-02-28)
Re: Optimizing Across && And || bill@amber.ssd.csd.harris.com (1995-02-28)
Re: Optimizing Across && And || ryg@summit.novell.com (1995-03-03)
Re: Optimizing Across && And || leichter@zodiac.rutgers.edu (1995-03-07)
Re: Optimizing Across && And || preston@tera.com (1995-03-08)
Re: Optimizing Across && And || pardo@cs.washington.edu (1995-03-13)
Best, Simple versus Best preston@tera.com (1995-03-14)
Best, Simple versus Best preston@tera.com (1995-03-14)
Re: Optimizing Across && And || chase@centerline.com (1995-03-14)
Re: Optimizing Across && And || jqb@netcom.com (1995-03-15)
[9 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: leichter@zodiac.rutgers.edu
Keywords: optimize, design, comment
Organization: Rutgers University Department of Computer Science
References: 95-02-179 95-03-028
Date: Tue, 7 Mar 1995 16:19:05 GMT

ryg@summit.novell.com writes:
> This trend has turned into: why are compilers not optimizing this
> particular sequence. [This doesn't make much sense for most programs...]


Agreed. For a classic look at the opposite approach, you might want to dig up
a paper that appeared in a Proceedings of a compiler construction conference,
which was published as a SIGPLAN Notices back in 1984. (I have the exact
reference at home - I was looking at the paper a couple of days ago.) The
paper is by Mike Powell, describing his implementation of a Modula-2 compiler
for the VAX (later ported to other machines) for use at DEC SRC. (That
compiler would eventually evolve into a Modula-2+ compiler; Modula-2+ formed
the germ of Modula-3, one of the nicer languages out there today.)


Powell's approach to the optimizer was what he called "best simple": Do the
best job you can while keeping the optimizer itself simple and easy to under-
stand (and thus get right). He rejects many of the published algorithms as
too complex, too hard to understand, and too unlikely to be useful in most
programs. The basic design used in Powell's he credits to papers dating back
to 1970.


Despite its simplicity and small size, the compiler was very competitive,
easily beating out other compilers for Modula-2, but also beating or coming
close to much larger, more sophisticated compilers for Pascal, C, and Bliss.


This lesson has to be re-learned periodically. I suppose the intellectual
heir to Powell's Modula-2 today is lcc - small, fast, simple, but still
manages to do a much better job than expected.


-- Jerry
[I happened to be at the conference where Powell delivered that paper. It was
the last one on the program and I think by far the best. -John]
--


Post a followup to this message

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