johnson@p.cs.uiuc.edu (Ralph Johnson) (08/05/88)
A good way to get speed at the expense of size is in-line substitution.
While this optimization is not used by many compilers now, I think it
will become very popular as programs tend towards consisting of a large
number of very small procedures. My optimizing compiler for Smalltalk
uses in-line substitution agressively, often substituting half a dozen
levels deep. Sometimes this makes the program smaller, such as when a
closure (block) is eliminated. (The current code for creating a closure
is pretty large.) However, it usually makes the program larger, and
always makes it faster.
Ralph Johnson -- uiucdcs!johnson, johnson@cs.uiuc.edu
--
Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU
Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima
Please send responses to the originator of the message -- I cannot forward
mail accidentally sent back to compilers. Meta-mail to ima!compilers-request