Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!mintaka!spdcc!iecc!johnl From: johnl@iecc.cambridge.ma.us (John R. Levine) Newsgroups: comp.arch Subject: Re: Optimising C compiler question Message-ID: <1991Apr22.135220.23198@iecc.cambridge.ma.us> Date: 22 Apr 91 13:52:20 GMT References: <9537@cognos.UUCP> Distribution: comp Organization: I.E.C.C. Lines: 26 In article meissner@osf.org (Michael Meissner) writes: >I seem to remember that Fortran-II had a frequency statement, and that >it was removed because they discovered the users were usually wrong. Actually it was the original Fortran I. The FREQUENCY statement let you specify the relative likelihood of each of the three branches from an IF statement (less, equal, and greater to zero) as well as the average number of trips through a DO loop. Fortran II dropped it, because it was infrequently used, and because it made little difference given the architectures and software technology of 1960. Apparently it wasn't even implemented right. The frequency numbers were applied to the wrong branches of the IF, and for several years nobody noticed. >I think it's much better if you have some tool that automagically >records which way the branches go, and run the program(s) under the >appropriate test harnesses. Indeed, though I wonder how much better that will really do than the usual heuristics, e.g. backward branches will be taken, forward branches won't. -- John R. Levine, IECC, POB 349, Cambridge MA 02238, +1 617 864 9650 johnl@iecc.cambridge.ma.us, {ima|spdcc|world}!iecc!johnl Cheap oil is an oxymoron.