I do not know if this has been done before (a quick google search revealed nothing)
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.
In these "macro"-benchmarks, the other side always complains your version in their language is not idiomatic enough, or doesn't take into account *something* very important, or you run it under wrong settings, or something.That's why I prefer nano-banchmarks. E.g. I can compare substring to substring, and it's hard to question the result.
--On Fri, May 10, 2013 at 3:00 PM, Ladislav Thon <lad...@gmail.com> wrote:I do not know if this has been done before (a quick google search revealed nothing)My quick google search for "deltablue java" immediately found this: https://github.com/xxgreg/deltablue, which interestingly also contains a comparison with Dart (and V8 and C).LT
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
An interesting comparison would be on Android - DartVM vs Dalvik.
I believe Dalvik is around 2x slower than Hotspot (link), which is understandable since Dalvik is optimized for mobile so it probably uses a lot less memory. Hotspot (and thus Dart) is in another league in terms of raw speed.Dalvik might be an interesting addition to memory consumption benchmarks. I have yet to see one of those.
The resident set size for the JVM when running ~100k iterations of deltablue was ~250MB, the DartVM was ~170MB, C was 2.5MB.
JVM's are effectively dead on the client.