Path: utzoo!attcan!uunet!lll-winken!sun-barr!olivea!mintaka!spdcc!esegue!compilers-sender From: eerke@cs.kun.nl (Eerke Boiten) Newsgroups: comp.compilers Subject: Re: Aggressive optimization Keywords: optimize, design Message-ID: <2309@wn1.sci.kun.nl> Date: 19 Oct 90 09:39:49 GMT References: <1458@exodus.Eng.Sun.COM> <13405:Oct1800:22:5690@kramden.acf.nyu.edu> <2301@wn1.sci.kun.nl> <18662:Oct1817:18:0090@kramden.acf.nyu.edu> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: eerke@cs.kun.nl (Eerke Boiten) Organization: University of Nijmegen, The Netherlands Lines: 44 Approved: compilers@esegue.segue.boston.ma.us In article <18662:Oct1817:18:0090@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >In article <2301@wn1.sci.kun.nl> eerke@cs.kun.nl (Eerke Boiten) writes: > [ after my description of the most general optimization technique ] >> A useful technique, indeed (called "strength reduction" in optimising >> compilers, "finite differencing" in transformational programming). > >Huh? The strength reduction and finite differencing that CS majors learn >is absolutely trivial compared to what anyone can do by hand. As I said, >walking through an array is only the simplest example. It's my experience that CS majors learn *principles*. Of course, principles often seem trivialities to experts. And "what *anyone* can do by hand" is trivial by definition. >Does anyone have a compiler that can introduce a non-linear intermediate >expression and reduce around it? [More examples of sophisticated optimisations deleted] Frankly, I don't know. >> Of course, finite differencing is relatively safe >> since you introduce redundant information most of the time. > >It's exactly this attitude of ``finite differencing is the only >optimization in the world'' that leads people to think that hand >optimization is useless. Both the attitude and the conclusion are wrong. That's not what I said. You called "finite differencing" *the most general* optimisation technique. IMO, it's one of the few general techniques that can usually be safely applied by hand. Things like loop jamming (fusion, merging, etc) are much more error prone. Same goes for code motion. Just to mention a few techniques that compilers can and do apply. I'd be the last to argue that human intelligence is no longer necessary for program optimisation. Some people consider program transformation an AI subject ... Eerke Boiten Department of Informatics (STOP Project), K.U.Nijmegen Toernooiveld, 6525 AD Nijmegen, The Netherlands Tel. +31-80-612236. Email: eerke@cs.kun.nl -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.