johnl@ima.UUCP (06/16/87)
In an earlier article, Bill Wulf is quoted as: > Finally, a soap-box that I've been on for a long time: > > There is no such thing as a "machine-independent" optimization! > > Not one! People who use the phrase don't understand the problem! > There are lots of semantics-preserving transformations that improve > code-size or speed for some machines under some circumstances. But > those same transformations may be pessimizations for another machine! I'm curious about "very high level" program transformations: for example, operator properties such as associativity can be used to transform certain non-tail-recursive functions to tail recursive ones (whence getting an iterative program is straightforward). Now it seems to me that transforming a function that takes O(n) stack space -- not to mention the recursive calls -- to one that uses O(1) space and no function calls would be a win on pretty much all machines. [High level transformations seem only to be considered in the context of optimizing Lisp, probably because in conventional languages it's so hard that people don't even try. But I don't understand why the rest of the compilers community never looks at Lisp. -John] --- Saumya Debray CS Department, University of Arizona, Tucson internet: debray@arizona.edu uucp: {allegra, cmcl2, ihnp4} !arizona!debray -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!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