49 points · by nikolay_botev · 13y ago · 22 comments
IMO DeltaBlue is a terrible benchmark typology anyway. Benchmarks have to be localized for them to mean anything; and even then, they don't mean much 90% of the time. Dart's pretty neat (editing a book about it atm), but this kind of language zealotry is just silly. Dart is hardly a silver bullet. And many of the truly interesting features (mixins, isolates, fancier mirrors) are yet to be implemented or incomplete. Definitely keep an eye out for Dart, but don't fall all over yourself thinking that it outperforms Java (whatever that even means).
Also check this one: http://dartogreniyorum.blogspot.ch/2013/05/performance-optim...
and later with Simd:
http://dartogreniyorum.blogspot.ch/2013/05/dart-beats-java-i...
Btw, I think even with the modifications made to Java version mentioned in the link you gave, I think latest version of dart now beats Java.
Edit: Author of blog post also compared Richards and Tracer benchmarks: http://bonovox.be/blog/dart-vs-java-richards-and-tracer/
However it's worth noting that deltablue has been used to benchmark polymorphism in Smalltalk, Self, the JVM, and V8.
Some of Nickolay's numbers are from a version of the code written at Sun labs, presumably for the very purpose of benchmarking the JVM.
I think it's safe to conclude that in many cases the DartVM already performs similarly to the JVM, albeit with a much better start up time.
Charles Nutter has some interesting follow up comments here:
http://blog.headius.com/2013/05/on-languages-vms-optimizatio...
Basically concluding that it's not static typing that matters, but predictable types.
For anyone who has worked on a large codebase with a fundamentally unsound architecture or inconsistent requirements you can feel their pain and understand their motiviation in making dart. Basically they are trying to show that if they just change the architecture of js a little bit to make dart then they can get twice (currently) the performance and a lot less complexity. They knew they could do this because they used to work on smalltalk vms. (I think that in another way dart is actually an algol-like trojan horse for the invasion of smalltalk because there's a load of ex-smalltalkers on the team and you can never cure those guys).
What's a little tragic about it is that they can't figure out why people aren't jumping all over dart (yet). The tragedy lies in the fact that they are partly responsible for it by hiding just how bad js is in terms of performance through their heroic efforts on V8. Then again the video is titled "Web Languages and VMs: Fast Code is Always in Fashion". The last word in the title shows that they probably do have their suspicions as to why people aren't immediately flocking to dart.
That said Dart isn't that JS2. Perhaps that languages will never exist at all. I assume that what web might need is a VM that can run various languages on. And Javascript as web bytecode just doesn't sound right to me.
To me, it is. Dart fixed everything which was wrong with JavaScript. There is proper lexical scoping, a lexically scoped `this`, no type coercion, build-in classes/inheritance, built-in dependency handling, built-in annotations/doc-comments, and good tooling is also possible.
It really does scale and it's very nice to work with. Plus, there are a bunch of nice features like lambdas, mixins, and named arguments.
> Javascript as web bytecode just doesn't sound right to me.
Yea, it's kinda icky, but there doesn't really seem to be a way around it. Fortunately, dart2js' output is reasonable in terms of size and performance. Unfortunately, it doesn't work in IE8.
Dart was initially slated for being "boring". It's comments like this that start to show that being familiar and unsurprising is sometimes a worthwhile goal.
When I write Java I always feel like I'm using bigger tools than needed. Like anonymous classes, when I just need a anonymous function etc.
I think Dart looks very promising in that regard especially when you compare it to JavaScript without feeling as heavyweight as Java.
Dart is actually a very terse and expressive language. Less ceremony and feels much more like other dynamic languages like Python or Ruby. Yet having optional typing and simple semantics it is one of the dynamic languages with extraordinary tooling support.
In a way Dart gives you the best of both worlds. It takes the good parts and leaves out the bad :)
Porting code written for VM a to VM b by some rubric hardly seems like a fair comparison.
It is an old well used benchmark, used for benchmarking object-oriented code with polymorphism.