🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #10390

Re: Optimising C compiler question

#10390
From: John R. Levine
Date: Mon, 22 Apr 1991 13:52
26 lines
1784 bytes
In article <MEISSNER.91Apr18150644@curley.osf.org> 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.
Technical Details
Message-ID: <1991Apr22.135220.23198@iecc.cambridge.ma.us>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!mintaka!spdcc!iecc!johnl
References: <9537@cognos.UUCP> <kcollins.671991559@convex.convex.com> <MEISSNER.91Apr18150644@curley.osf.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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> <kcollins.671991559@convex.convex.com> <MEISSNER.91Apr18150644@curley.osf.org>
Distribution: comp
Organization: I.E.C.C.
Lines: 26