Which is the fastest computer language
(for numerical calculation?)

In the past there were differences, FORTRAN compilers about 50% faster. (I maintain: the difference was mainly due to pressure from the community of users.)

Recently, these differences have largely disappeared, due to sophisticated compiler design.


issues

what is meant by speed in this question?

folklore

Speed of languages is mythical, a matter of folklore.

Greatest gains are to be made at high (application) level, not in low-level code.


tests

A simple test of low-level numerical calculations using multiple languages

Try it yourself! speedtest.tar.gz

Results of test on an Intel CPU

Within a suite of compilers (Intel, Gnu, etc), there is very little overall difference in speed between one languages for simple numerical tasks.

Function calls: slow? No -- Fast.

Some operations are indeed slow: floating point division, synchronized functions in Java. Use carefully.

Still differences between compilers made by different groups. (However: have heard that latest Gnu compiler is competitive with the Intel compiler on Intel hardware.)


choices

Modern object-oriented languages are built to handle very complex problems naturally.

On the other hand, for a very short program stupid to do object-oriented analysis, design, and programming

Good reasons to choose a programming language


specific languages

Java: for speed use '-server' switch

scripting languages Python, Perl same code using their native arrays can be very much slower. (With Python more like 60)

so could write a sophisticated high-level code in Python, with nice syntax, which calls fast low-level libraries (e.g. SciPy, NumPy)


advice

If must write new FORTRAN, learn modular programming using FORTRAN 90

Write good clean code: if it's clean, it's easier to optimize

premature optimization is the root of all evil -- Knuth