Post by h***@bbs.cpcn.comGiven the importance of efficient code, why wasn't the 7090
compiler not optimizing?
Having a choice between an optimizing compiler and a non-optimizing compiler is
not a bad thing. If the intended program is not going to run for a long time,
the cost of producing a highly optimized version may not be paid for by the
savings in shorter run time. This was already noted in another reply to your
post.
I think there were two major reasons, though, that specifically applied in the
actual historical situation:
One was that the Fortran II compiler still worked on the 7090. The 709 was an
upgrade of the 704, and the 7090 was a transistor version of the 709. There were
minor incompatibilities between the 709 and 704, but IBM did not have much
difficulty adjusting the compiler to deal with them. The 7094 introduced some
other added features which again required small changes to the compilers.
The other was that Fortran IV was a significantly extended language compared to
Fortran II. So this time modifying the original Fortran compiler didn't seem
like a reasonable option.
Back to the more general question of "optimizing" versus "non-optimizing", some
other context may be helpful.
Also, with transistorized computers, now computer time was a bit cheaper - and
the initial skepticism about higher-level languages that IBM felt it needed to
overcome by showing that efficient code was possible had been overcome.
A non-optimizing compiler still generated code of reasonable quality. Before the
first IBM Fortran, higher-level languages were very slow because they didn't
compile to machine code at all, but to some type of interpretive layer - instead
of P-code, more common then was code made up of subroutine calls.
Compared to the original 704 FORTRAN, FORTRAN II added vital features, like the
subroutine call. On the other hand, FORTRAN IV added features like the logical
IF statement and CHARACTER variables. So the added features of FORTRAN IV were,
to some extent, luxuries, and if someone had serious number-crunching to do, it
was not too painful to do it in FORTRAN II.
My suspicion is that it was the Logical IF statement that made it just a little
bit too hard, at the time, to modify the original 704 FORTRAN to handle FORTRAN
IV, because it optimized programs by tracing the possible paths of execution,
and the Logical IF was just a little bit too flexible. (Admittedly, that doesn't
really make sense; either a Logical IF has a single statement it controls, or a
GO TO statement, and either way that should not be any more complex than an
Arithmetic IF.)
John Savard