FAQ
cookedm+news at physics.mcmaster.ca (David M. Cooke) wrote in message news:<qnk8ykdp3a0.fsf at arbutus.physics.mcmaster.ca>...
At some point, llothar at web.de (Lothar Scholz) wrote:

Samuel Walters <swalters_usenet at yahoo.com> wrote in message news:<pan.2004.01.11.06.08.18.867825 at yahoo.com>...
I know very little about numeric processing, and even less about Fortran.
It's true that my background is in mathematics, but in *pure* mathematics
where pointer-based languages tend to be helpful, not hurtful.
Okay seems that you don't know a lot about compiler writing.

A C compiler only knows a little bit about the context so it must
always assume that a data inside a member can be referenced from
another place via an alias pointer.

Fortran does not have this problem so a lot of optimizations can be
done and values can be hold in registers for a much longer time,
resulting in much greater speed.

Remember that on supercomputers a 25% spped enhancement (which a good
fortran compiler is faster then C) can mean a few million dollars of
saved hardware costs. The coding time is not importing compared to the
running time. So real hard numerics are always done in Fortran.

GNU Fortran is a stupid project because it translates the Fortran code
to C.
Err, no. You're thinking of f2c. GNU Fortran uses the same backend as
the GNU C compiler, in that it translates to the same intermediate
language (sort of assembly language) on which optimizations are done.
But the C front end and the Fortran front end are separate.
But the front end is, as far as i know, only responsible for syntax
analysis. All code generation like control flow analysis, register
allocation etc. is done on the intermediate 3 register language. And
the hints you could get from the fortran language are simply unused.

But i must say that i never used Fortran (when i studied physics) in
the last 15 years for any real programming. I only wanted to point out
that a lot of languages are by design faster then C. Fortran was one
of these. You can find articles on the web where the same is explained
for lisp and functional languages.

C and C++ is not a good compilation language when it comes to compiler
optimization.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2018 Grokbase