[TUHS] arithmetic IF (was origin of string.h and ctype.h)

arnold at skeeve.com arnold at skeeve.com
Fri Aug 18 00:04:38 AEST 2017


"Greg 'groggy' Lehey" <grog at lemis.com> wrote:

> Looking at the assembly listings of the FORTRAN II compiler
> (http://www.softwarepreservation.org/projects/FORTRAN/source/fortran-ii/fort1.lst.html,
> 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



More information about the TUHS mailing list