79 Languages speed competition: Can we make Fortran win?

@CRquantum ,

By “champion”, I presume you hope to find Fortran codes prove to be the fastest in a series of performance benchmarks.

Please note that is generally not possible at all now.

The best you can expect is on an apples-to-apples basis, Fortran codes will show somewhat similar performance - see here.

But the reality is other programming paradigms, particularly the C++ derivatives and Julia - will be able to bring to bear a host of other performance-enhancing aspects that will place them far ahead of Fortran, especially in microbenchmarks and also big application studies that call for large teams and massive $$ investments. Fortran simply doesn’t have the resources and the infrastructure now to bring in such aspects, often not even the will to do so (perhaps rightly so!).

What you notice here with prime number challenge is basically “CONSTEXPR” / compile-time computing with same outcome: at best, a Fortran solution might appear somewhere on the lower half of the leaderboard but nowhere near the top. You will be continuously disappointed if you hope to see Fortran in the top half.

3 Likes