While there are a range of factors for deciding on a programming language,
let’s consider speed and source-code size (verbosity) the important factors here, If I could add a Z axis it would be popularity, I’ll briefly overview the best options all things considered at the end.
I’ve processed the benchmark game summary data with R to generate some performance graphs. The Y axis is the compressed code bytes, and the X axis is the speed, these are logarithmic scales, so even small distances may mean big differences. Depending on the size of your screen you may wish to enlarge the image. The programming languages are marked with capital letters, the blue ones being average performance, and the red ones being median performance.
Here is a legend so you can find your favorite languages for comparison:
Here are the single-core graphs:
Here are the multi-core graphs:
Some interesting standouts are Ada, which is the most verbose in all areas,
while Ruby and JRuby is the most concise for single core processors.
Not surprisingly C and C++ are the fastest in all areas, followed closely by Fortran. What is fairly new amongst the “racehorses” is Rust, which has come a long way, and now is neck and neck with C and C++ in the single-core domain, though is slightly more verbose in all domains, and also lags behind in median performance. Also in the C-like languages is Go, which is fairly close to optimal.
The slowest at the rear of the pack are the traditional scripting languages, Python, PHP, Perl, Lua and Ruby. Of them JRuby is the fastest, particularly in the single-core arena. They have also been recently joined by Hack, with the slightly speedier TypeScript.
In terms of Java inspired languages such as C# and Scala, C# is the slowest, Scala the fastest and Java the most verbose. Java is also the most portable of them.
In terms of functional programming languages, such as Lisp, Haskell, Racket, F# and Ocaml. Haskell seems to be the closest to optimal in terms of speed, with F# being more concise.
The sourcecode for this is libreware and available,
if someone comments I’ll post it up on sourceforge for download.