Xref: utzoo comp.lang.fortran:1520 comp.lang.misc:2173
Path: utzoo!attcan!uunet!mcvax!enea!sommar
From: sommar@enea.se (Erland Sommarskog)
Newsgroups: comp.lang.fortran,comp.lang.misc
Subject: Branch frequencies (was Assembly or ....)
Message-ID: <4113@enea.se>
Date: 27 Nov 88 21:55:11 GMT
Organization: ENEA DATA AB, Sweden
Lines: 21

Herman Rubin (cik@l.cc.purdue.edu) writes:
>There is no provision for input
>as to frequency of branches.  Should the common condition be the branch
>or the rare condition?  ...
>I think the compilers should be interactive, and
>discuss the various possibilities with the programmer.  

If memory serves right the compiler Rubin wants exists, or
at least it has existed. I recall a friend of mine told me
that the very first Fortran compiler allowed you to give
probabilities of on the IF statements. The compiler then used
one of its passes to do a Monte Carlo simulation on the
program for optimal optimising.

I'm probably wrong on everything, but I'm sure that friendly
people will correct me.
-- 
Erland Sommarskog
ENEA Data, Stockholm
sommar@enea.se
"Frequently, unexpected errors are entirely unpredictable" - Digital Equipment