4 ms·
The Dart authors are geniuses but even they can't violate the laws of physics. Dart is between two and five times slower than Java, as of six months ago [1].
by incepted 11y ago
The Dart authors are geniuses but even they can't violate the laws of physics.
Dart is between two and five times slower than Java, as of six months ago [1].
It's not clear whether Dart can close that gap since Java is not standing still either, so I remain completely unconvinced that Dart will ever be the replacement of Java on Android.
[1] http://benchmarksgame.alioth.debian.org/u32q/dart.php http://benchmarksgame.alioth.debian.org/u32q/dart.php
- PeCaN 11y agoIt's not in any way a physical limitation that Dart is slower than Java. It's just somewhat harder to make fast, and even then, some of Dart's design is motivated by being able to implement the language efficiently. [1] Dart could even in theory have a compiler that assumes all your type annotations are correct and simply AOT compiles your code. (So your workflow would be: develop -> fix type errors -> run in regular VM -> loop -> AOT compile -> deploy.) Whether that would be useful is another matter, but it could certainly be possible (some Common Lisp implementations in fact do exactly this [2]). -- 1: https://www.dartlang.org/support/faq.html#q-why-dart https://www.dartlang.org/support/faq.html#q-why-dart 2: http://www.sbcl.org/1.0/manual/Declarations-as-Assertions.html http://www.sbcl.org/1.0/manual/Declarations-as-Assertions.ht...