Wednesday, January 9, 2008

Programming language performance

Newer versions of Java executes really fast thanks to the innovations of hotspot and especially Java 6. But how fast is it actually compared with other languages. 

I stumbled upon an older blogspot posting by Charles Nutter, one of the developers on JRuby, called Alioth Numbers for JRuby 1.0. In the post he talks about performance benchmarks done on JRuby compared with Ruby.

The posting is based on performance benchmarks from The Computer Language Benchmarks Game project. This is an open source project, with the following statement on site's front page:

Benchmarking programming languages?

How can we benchmark a programming language?
We can't - we benchmark programming language implementations.

How can we benchmark language implementations?
We can't - we measure particular programs.


I don't think this project has gotten the attention it deserves in the Java community. It seems to me like the only serious attempt to compare different language implementations and their performance. This should be of special interest when comparing different languages running on the JVM.

The project compares 40+ languages with 18 different benchmarking programs/algorithms. Among the languages are Scala, Groovy, JRuby, JavaScript Rhino, and various versions of Java.

The fun part is to change the weighting of the test programs to try to make your favorite programming language rank higher.

Finally we have actual benchmarks to back our discussions on which is the better language, with regards to performance.

Go try it out!

3 comments:

Isaac Gouy said...

The fun part is ...

Noooo! The fun part is writing better programs :-)

Alf said...

Agreed! :)

Alf said...

I am actually a huge Scala enthusiast. I have been learning Scala for more than a year now, and I have also made small system, which is in production, with Scala and Wicket.

In Norway we have started a Scala user group, and it is actually going well. A lot of interest in Scala these days. I will have a look at the articles you've collected. Thanks for the tip.