Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Three liars, in FORTRAN [long]



James,
A little ancient computer history, C was originally written to write
an operating system (Unix) and as such it has to have good I/O capability
and be machine independent (easily transferred from one machine to another).
The much older FORTRAN was written in machine language and a great deal of
work was done on how to optimize it for a given machine. Speed was not a
major issue with early C, and the result was that in comparing early
versions of both fortran was much faster. One case I was involved with it
was close to two to one. Then the computer people decided to write FORTRAN
in C (Machine independence), these versions were typically no better then C
in speed. So you have to be careful when you compare the two.
The main reason FORTRAN still survives is that many of us have a
large investment in Fortran routines, the language is well adapted to
mathematical calculations (It has straight forward matrix handling and
complex numbers).
Whereas in C programs, I find myself spending a lot of time worrying about
what functions are passing each other and not what they are doing.

I hope this helps.

Gary

Huh? I thought that the original attraction of C was that it was
very "close to the machine", compared to comtemporaries FORTRAN and
Pascal. It has things like an increment operator, which machine language
does but FORTRAN doesn't. On the other hand, FORTRAN has built-in output
functions, while the C language itself does not (the C input/output
routines are actually in standard libraries, sort of like software
plugins).

I didn't know about the speed advantage FORTRAN still has. Could it be due
to FORTRAN being more focused on floating point math?

--
--James McLean
jmclean@chem.ucsd.edu
post doc
UC San Diego, Chemistry

Gary Karshner

St. Mary's University
San Antonio, Texas
KARSHNER@STMARYTX.EDU