Dart2js is faster than V8 in DeltaBlue test
dartlang.org
dartlang.org
Similarly, the dart2js numbers are generated by compiling the benchmarks and harness to JavaScript and then running the generated code in V8.
Finally, the V8 numbers are generated using the same benchmarks written in JavaScript and with exactly the same harness rewritten in JavaScript.
From what I'm reading, this appears to suggest that Dart2js isn't faster than V8, but is instead faster than a handwritten code. Still a good achievement!
The reason I bring this up is because I was confused at how javascript (even compiled from Dart) could be faster than the engine that is running it.
So there could be some difference between the original code in both, and some benefit from compiling to js (e.g. they could use crazy tricks similar to asm.js to generate faster code perhaps based on type hints present in Dart but not the JS)
Essentially, no human word use unhandy, verbose, hard to read syntax whereas a compiler might. Thus in practice the JS subset that handwritten code uses is different from that of compiler generated code.
But it's still encouraging to see such results from its Javascript backend. Ideally we'd be able to experience the productivity gains of Dart without having to introduce an entirely new browser VM.
[1] https://blog.mozilla.org/nnethercote/2012/08/24/octane-minus...
Surely Richards and DeltaBlue are not ideal. Honestly I don't think there is such thing as an ideal benchmark. However both Richards and DeltaBlue capture performance aspects of language features that are used by absolutely any object oriented program: cost of method calls, polymorphism, field accesses, etc.
We are definitely looking into publishing more benchmarks on this page. In the meantime feel free to benchmark Dart yourself and report any performance issues.
[1] http://benchmarksgame.alioth.debian.org/u64q/performance.php...
No. Not "done by Debian". Alioth is a project hosting service like sourceforge or savannah.
I didn't find anything on the blog page you linked to that talks about why Richards or DeltaBlue are or are not ideal.
• "dart" means "handwritten Dart running in the Dart VM"
• "v8" means "handwritten JavaScript running in V8"
• "dart2js" means "dart2js-generated JavaScript running in V8"
I can't find any link to the actual handwritten JavaScript (or the handwritten Dart) that these benchmarks are based on. Without this, it's impossible to know the value of these numbers.
Maybe the handwritten JavaScript is written really badly. Maybe the procedure performed by the respective languages is something that dart2js is particularly good at optimising. Who knows.
The JavaScript version is part of the Octane Web Benchmark. The DeltaBlue component is here: https://code.google.com/p/octane-benchmark/source/browse/lat...
The Dart version of DeltaBlue is here: https://github.com/dart-lang/benchmark_harness/blob/master/e...
DartVM is almost twice as fast :)
dart(20315)512.24
dart2js(20315)334.67
v8(14027)321.00
Everyone wants to replace Javascript, but this seems to be another opportunity for reposting the worse is better article.
The Dart team has realized that selling people on the DartVM will be hard, so they are putting a lot of effort into dart2js.
(note: yes yes, there are chromium builds that include the DartVM, but it is not officially part of Chrome yet).
Dart isn't "yet another" compile-to-js solution. It's the most fully fledged one. Coffeescript is just a loose set of macros that still looks and smells like javascript. Typescript is just statically typed javascript. Dart is a fully-fledged language with its own complete IDE and a lot of new trendy features.
"The score is essentially runs/second: the number of times you can run the benchmark in one second. For all scores, bigger is better"
So, no, dart2js is actually slower than hand written javascript code, which is in turn slower than dart code running on the dart VM.
EDIT : I got it all wrong, sorry, didn't see the far end of the graph.
maybe you meant: "I don't know if Dart will be maintained in the long term, so I'll avoid it for now"
Also, on some of my benchmarks, Go is faster than some other compiled languages (like D) and can be more memory efficient than Java: http://benchmarksgame.alioth.debian.org/u32/benchmark.php?te...
It's certainly not being "left behind", it's just new.