[comp.arch] global optimization

henry@zoo.toronto.edu (Henry Spencer) (07/11/90)

In article <MEISSNER.90Jul10102037@osf.osf.org> meissner@osf.org (Michael Meissner) writes:
>I've always wondered about the gains.  Speaking off the cuff, I would
>imagine you would get gains if you limit yourself to a Fortran style
>of coding (no matter what language you use)...

There are many people who will pay almost anything to get their
Fortran-style programs to run a little faster.  Very little of the
existing software base is in the more dynamic languages like Lisp.

Actually, it is likely that you will always want to write in a Fortran
style, or a more sophisticated variant that a compiler can turn into
Fortran style, if you want maximum speed.  Deferring decisions to
run time invariably has a price.

>I also wonder about the computational complexity of global register
>analysis...

As John Mashey has commented, you should make a distinction between what
you routinely do for unimportant programs and what you are willing to do
for a major program that has just *got* to run faster.  (Actually, he put
it more dramatically:  "we've got customers who will commit vile acts
for another ten percent".)
-- 
NFS is a wonderful advance:  a Unix    | Henry Spencer at U of Toronto Zoology
filesystem with MSDOS semantics. :-(   |  henry@zoo.toronto.edu   utzoo!henry

aglew@oberon.crhc.uiuc.edu (Andy Glew) (07/12/90)

[Henry Spencer]
>Deferring decisions to run time invariably has a price.

Can anyone provide me with an attribution for one of my favorite sayings?:

    "Never put off until run time what you can do at compile time."

I think it came from one of the early RISC papers, perhaps Radin,
although when someone wanted to use it in a papers on optimizing
Smalltalk, asked me if I might not have come up with it myself.

Anecdote: when I posted this to an internal notesfile at one of my
first employers, nearly all the CSers came down heavily on me. Two
years later, with RISC popular, they all sang a different tune. My,
how times change.

--
Andy Glew, aglew@uiuc.edu

preston@titan.rice.edu (Preston Briggs) (07/12/90)

In article <AGLEW.90Jul12102429@oberon.crhc.uiuc.edu> aglew@oberon.crhc.uiuc.edu (Andy Glew) writes:

>Can anyone provide me with an attribution for one of my favorite sayings?:

>    "Never put off until run time what you can do at compile time."

David Gries, in "Compiler Construction for Digital Computers",
circa 1969.  It's in the chapter at the end that's full of
useful hints to compiler writers.

--
Preston Briggs				looking for the great leap forward
preston@titan.rice.edu