This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Grid/performance comparisons of Scala/Java/Groovy/JRuby/...?

2 replies
Ken McDonald
Joined: 2011-02-13,
User offline. Last seen 42 years 45 weeks ago.
Just wondering how the different languages in the JVM space are doing. I want Scala to succeed but have become more pessimistic about it recently (due to semantic complexity, but there are other factors such as performance out there), so thought I would ask for pointers to decent language comparisons.
I realize there are no thorough answers, let's keep it polite and try to be as informative as possible. :-)
Thanks,Ken
ichoran
Joined: 2009-08-14,
User offline. Last seen 2 years 3 weeks ago.
Re: Grid/performance comparisons of Scala/Java/Groovy/JRuby/...
The three performance comparisons that I know of that aren't entirely a joke are

(1) The Computer Languages Benchmark Game at shootout.alioth.debian.org.  You can look at all sorts of benchmarks, but there are of course limitations (many of which are stated quite plainly on the site's faq).  Bottom line: Scala and Java are about even (at about half C/C++ speed), with Clojure 3x slower, and JRuby 10x slower than that.

(2) Tim Bray's WideFinder2 log-file-parsing test (benchmarks simple tasks on lots of cores, results at http://wikis.sun.com/display/WideFinder/Results).  Not great, because strategy makes a HUGE difference.  Scala is less than 2x slower than C++; Clojure (reported at http://meshy.org/2009/12/13/widefinder-2-with-clojure.html) is a little less than 2x slower again; Java is 3x slower than Scala; Groovy is competitive with Java.  (Can you tell, yet, how implementation-dependent this is?)

(3) Google's code comparison--which ended up showing that the people involved weren't trying to write high-performance code, and stopped optimizing at various different stages.  You can Google for summaries, but Scala beat Java and Go by sizable margins (~2-3x).  The top hit is http://www.readwriteweb.com/hack/2011/06/cpp-go-java-scala-performance-benchmark.php

So really, the Computer Languages Benchmark Game is the only game in town.  Nobody else is really even playing.  Nonetheless, one should not need more evidence than the above three to know that one can write really fast Scala if one puts one's mind to it.  I do not know of any other non-Java JVM language which has that kind of record at this point (though one could of course create one).

  --Rex

On Sat, Dec 3, 2011 at 2:40 PM, Kenneth McDonald <ykkenmcd [at] gmail [dot] com> wrote:
Just wondering how the different languages in the JVM space are doing. I want Scala to succeed but have become more pessimistic about it recently (due to semantic complexity, but there are other factors such as performance out there), so thought I would ask for pointers to decent language comparisons.
I realize there are no thorough answers, let's keep it polite and try to be as informative as possible. :-)
Thanks,Ken

Ken McDonald
Joined: 2011-02-13,
User offline. Last seen 42 years 45 weeks ago.
Re: Grid/performance comparisons of Scala/Java/Groovy/JRuby/...
Rex,
Thanks for the info, this is precisely what I wanted to know. Specifically, I was interested in the performance of Scala vs. other JVM languages. It's becoming obvious to me (I may be wrong, I hope so) that Scala is suffering setbacks in terms of perceived (and possibly real) complexity and ecosystem support, so to succeed it needs more than just "increased productivity" as its mantra. Fortunately, its performance is a big plus.
Cheers,Ken

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland