Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparison of performance between Scala etc. and C/C++/Fortran?

I wonder if there is any reliable comparison of performance between "modern" multithreading-specialized languages like e.g. scala and "classic" "lower-level" languages like C, C++, Fortran using parallel libs like MPI, Posix or even Open-MP.

Any links and suggestions welcome.

like image 257
S.Tayefeh Avatar asked Feb 19 '10 20:02

S.Tayefeh


People also ask

What is faster C or Fortran?

Fortran semantics say that function arguments never alias and there is an array type, where in C arrays are pointers. This is why Fortran is often faster than C. This is why numerical libraries are still written in Fortran.

Is C++ faster than Scala?

If you're a genius. Google has released a research paper closely comparing the performance of C++, Java, Scala, and its own Go programming language. According to Google's tests (PDF), C++ offers the fastest runtime of the four languages.


1 Answers

Given that Java, and, therefore, Scala, can call external libraries, and given that those highly specialized external libraries will do most of the work, then the performance is the same as long as the same libraries are used.

Other than that, any such comparison is essentially meaningless. Scala code runs on a virtual machine which has run-time optimization. That optimization can push long-running programs towards greater performance than programs compiled with those other languages -- or not. It depends on the specific program written in each language.

like image 175
Daniel C. Sobral Avatar answered Sep 20 '22 20:09

Daniel C. Sobral