Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!uw-beaver!mit-eddie!husc6!necntc!ima!johnl From: johnl@ima.UUCP Newsgroups: comp.compilers Subject: machine independent optimizations Message-ID: <593@ima.UUCP> Date: Tue, 16-Jun-87 12:00:00 EDT Article-I.D.: ima.593 Posted: Tue Jun 16 12:00:00 1987 Date-Received: Sun, 21-Jun-87 14:29:16 EDT Sender: johnl@ima.UUCP Lines: 30 Approved: compilers@ima.UUCP 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