

Dart vs Java – the DeltaBlue Benchmark - ryeguy
http://bonovox.be/blog/?p=128

======
voidlogic
I'm not sure of DeltaBlue or the Computer Language Benchmarks Game is more
representative of "average programs", but they appear to give very different
results in their comparisons. On the Benchmarks Game dart is crushed:
[http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...](http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=java&lang2=dart&data=u64q)

I guess people will have to decide which results are more likely to reflect
the performance of their applications. But the extreme nature of the
difference is interesting in and of itself.

P.S. I have not looked at the Java code to see if it is idiomatic Java either-
And this really make be want to port DeltaBlue to Go...

~~~
voidlogic
Also this shows DeltaBlue as faster on Java when warmed up:
<https://github.com/xxgreg/deltablue>

~~~
sethladd
I opened <https://github.com/xxgreg/deltablue/issues/1> to request updated
numbers.

~~~
xxgreg
I had a quick look at this. It appears the DartVM is now beating the JVM even
at 100,000 iterations (Previously Java edged out Dart at higher iterations).

100,000 iterations takes ~45 seconds to run on my computer.

At a lower number of iterations the DartVM beats the JVM by a significant
margin.

The benchmark is easy to run (On linux, maybe macos too). Just check it out,
make sure dart, java and gcc are in your path, and execute run.sh.

Note, this code doesn't use the benchmark harness because I wanted to include
the warm up time in the measurements. At a high number of iterations this
doesn't make much difference.

------
ryeguy
I know that benchmarks are damned lies, but I'm honestly surprised it's this
close. Dart isn't even at 1.0 yet, and the JVM is almost 20 years old with
millions (billions?) of dollars into optimizing it. And to top it all off, the
dart vm throws away static types when it hits the vm - all of this is done
through its tracing jit (just like v8).

~~~
rayiner
Neither V8 nor Dart are tracing JITs. They're method-at-a-time JITs just like
the JVM. They just have to do more extensive type-feedback optimizations than
the JVM because the language are dynamically typed.

