On Wed, Mar 3, 2010 at 11:45 PM, Per Bothner <[email protected]> wrote:
> At http://shootout.alioth.debian.org/ aka "The Computer Language Benchmarks
> Game" there are solutions and performance numbers for
> 13 problems in various programming languages.  The JVM languages
> are Java, Scala, and JRuby.  I've written Kawa versions for
> most of the programs.  Does anyone have implementations for other
> JVM languages?  I'm mostly interested in languages/implementations
> that run within an order of magnitude of the speed of Java.

You want an order of magnitude? I'll give you an order of magnitude! I
just need the heart of an unborn satyr, the eye of a nebula crab, and
three hairs from the back of a Gosling. You'll get your order of
magnitude...and I'll exact my price later.

Seriously though...order of magnitude for what? Today I investigated a
Neo4J graph traversal in JRuby that was sadly (only) 7-8x slower than
a pure-Java version. After cleaning up some obvious bottlenecks in the
Ruby Neo4J library, I got it down to around 4x. With additional work,
I can probably get it in the 2-3x range or lower.

All these languages can potentially be within an order of magnitude of
Java for some things, and way off for others. For JRuby (and probably
Clojure and Groovy as well) the primary costs are in heap objects:
fixnums, flonums, closure data stores, and in Clojure's case,
immutable data structure offal. But for things like walking a graph,
it's not hard to get any language pretty close to Java, even if you
have to do a lot of reflective invocation.

The benchmarks on The Benchmarks Game range from useful (large-scale
object graph creation and iteration) to useless (numerical
computations, which excessively penalize languages you probably
shouldn't do numerical computation in to begin with). If there's a
specific algorithm you want to run fast, I can make it run fast. If
it's a general thermometer about language perf...you should know
that's nearly impossible to provide :)

- Charlie

-- 
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.

Reply via email to