Subject: FORTRAN versus C

From: [email-masked] (Ryszard Czerminski X 285)
Date: Thu, 10 Feb 1994 11:22:58 -0500

Moshe Olshansky wrote:
[...]
  However, for programs
written in a more or less standard language Fortran should indeed have
a better performance than C,  and this is due not to the compiler but
to the languages themselves. 
[...]

This is really hard to understand for me (maybe somebody would enlighten me
in this matter).
After all when you write a program (in any language) you basically
write a plain TEXT. Compiler converts it (eventually) into strings
of bits which hardware can understand, so every programs when finally
presented to the hardware looks more or less similarly boring

01110010010010101000000100...
101000101010001000100001010... etc

and this is COMPILER job to make these bits string perform
properly with given hardware.

Ryszard Czerminski, Molecular Simulations, Inc.

---

From: [email-masked] (Dr. Tom Pierce)
Date: Thu, 10 Feb 1994 13:37:33 +22305350 (EST)

> presented to the hardware looks more or less similarly boring

Ok - My vote on the religious war is that I like both C and FORTRAN.
My productivity toos are in C (mail, Mosaic, etc), my computations in FORTRAN.

Now as to the differences, C language allows one to easily write 
logical constructions that are complex and may have multiple outputs.
This makes optimizing C much harder than optimizing Fortran. Fortran is 
quite rigid in the logical segments that one writes.  A friend of mine,
once summarized it in this way. That he wanted to write C code, but he wanted
his customers to write in FORTRAN because it simplified his job.               

Basically if the language is simple and does not allow logical complexity,
then compilers can do a very effective job optimizing the machine code.
If the program has lots of different kinds of logical segments, then one
cannot anticipate the outcomes and prepare for them, or sometimes even
predict what part of the program would need to be loaded next.. 

I think that FORTRAN will be the language of computational science for
a long time. caveat - unless the MIMD parallel machines *change* the 
requirements for speed optimizations to something like I/O or nearest 
CPU/Instruction....

-- 
Sincerely, Thomas Pierce - [email-masked]  -  Computational Chemist
"These opinions are those of the writer and not the Rohm and Haas Company."

---

From: [email-masked] (Teerakiat Kerdcharoen)
Date: Thu, 10 Feb 1994 22:28:00 +0100 (NFT)

: 
: Ok - My vote on the religious war is that I like both C and FORTRAN.
:My productivity toos are in C (mail, Mosaic, etc), my computations in FORTRAN.
: 

  Hi,
	I absolutely agree with you on this point. In comparison with C,
  FORTRAN is easier to port to various machines. The language is simple
  and easy to understand and plentiful of mathematic functions. Anyway,
  there are some weak points that make the program written in FORTRAN
  lacking of Generality. FORTRAN does not support dynamical memory
  allocations and for this reason I come to love C finally. It takes
  less time to code in FORTRAN than in C. But after that, most FORTRANers
  have to re-compile again when they want to run programs using
  different parameters or configurations. In this case, C users just
  change their inputs or do at the Unix prompt. Molecular Dynamics program
  is one of the examples.

: I think that FORTRAN will be the language of computational science for
: a long time. caveat - unless the MIMD parallel machines *change* the 
: requirements for speed optimizations to something like I/O or nearest 
: CPU/Instruction....
: 

	I have to agree with you again on this point. Many langauges
  are going to die, COBOL, BASIC, PASCAL, RPG but not FORTRAN. It would
  be nice if you could extend this point more.
							sincerely,
							Teerakiat