"Greg 'groggy' Lehey" <grog(a)lemis.com> wrote:
Looking at the assembly listings of the FORTRAN II
compiler
(
http://www.softwarepreservation.org/projects/FORTRAN/source/fortran-ii/fort…,
mentioned by Paul McJones), a typical use of CAS is followed by two
unconditional TRA (transfer) instructions and further code, though
presumably early FORTRAN compilers would not optimize in this way.
You'd have to run some FORTRAN through the compiler to see. :-)
I remember reading an article somewhere on the history of the first
FORTRAN compiler. The guys doing it wanted it to succeed, and they
were fighting the mentality that high level languages could not possibly
be as efficient as hand-coded assembly, so they put a lot of work into
the optimization of the generated code.
It worked so well that the results that came out of the compiler
sometimes suprised the compiler writers! They then would have to
dive into the compiler sources to figure out how it was done.
I don't remember where I read this article. If the story rings a
bell with anyone, let me know.
Thanks,
Arnold