4 ms·
Doesn't a 30% performance improvement (I'm just talking dart vs. JavaScript, not dart2js generated code vs JavaScript) seem like a pretty weak result given that
by podperson 14y ago
Doesn't a 30% performance improvement (I'm just talking dart vs. JavaScript, not dart2js generated code vs JavaScript) seem like a pretty weak result given that they've created a new language? Sure, performance isn't the _only_ argument for Dart, but still.
It seems to me that if we're going to migrate away from JavaScript, let's get a serious performance boost while we're at it.
- pekk 14y agoIt seems to me that a nicer language even with a slight performance hit would be an advantage. Let alone 30% improvement
- podperson 14y agoThere are other downsides to a new language, so if you're going to get people to migrate you need some pretty big wins. Javascript is (a) not a terrible language (despite its warts) and (b) not a static target.
- eddieplan9 14y agoIf you are OK to move to a totally new language with a weak interop story, you might as well just use C++ with asm.js. C++ has many many years of compiler optimization work behind it. I am wondering how the comparison would be like. With that being said, I don't believe in anything with a weak interop story unless you are talking about utilizing legacy code, for which there is none for Dart but a lot for asm.js (and pNaCl, for that matter.) So I don't really see why Dart would fare better than GWT.
- lifthrasiir 14y agoWe are not going to migrate away from JavaScript (it would be impossible). We are figuring out how to use JavaScript without JavaScript's own warts.
- podperson 14y agoThis seems disingenuous to me. Why have a native VM at all? http://www.quirksmode.org/blog/archives/2011/10/dart_or_why_jav.html http://www.quirksmode.org/blog/archives/2011/10/dart_or_why_...
- kyrra 14y agoThat's a fairly old article on Dart and doesn't really cover Dart's current direction (or even their direction back then). The Dart team is very aware that it is highly unlikely that the DartVM will be put into any browser except Chrome (and there is no time-table on when that will happen). That is why their Dart2js compiler is seeing so much attention from the team. Dart, to me, is Google's new GWT, but trying to align more with the web as we know it today (instead of hiding the DOM from its users). Even if Dart is only ever cross-compiled to Javascript and used that way in production, I would prefer to code in Dart than Javascript for anything that requires more than a few lines of javascript to implement.
- rdtsc 14y agoPut it in Chrome and make awesome applications with it, everyone will follow. Nobody thought JS and Ajax was a serious thing until Google Maps came about and everyone's jaws dropped. Despite all the academic or theoretical benefits async requests it might have had, they didn't become popular until a killer application came about. I am also thinking Dart for Android? I wish they had Python for android, but oh well, I understand it was much more of a political thing, but I can see Dart+VM being that platform.
- michaelwww 14y agoI'm with you on this and I'm almost hesitate to say it because I want widen my head start ;)
- xxgreg 14y agoYou can already build Dart for Android, but it's x86 only. There is ongoing work to implement ARM (and MIPS?). Seems sensible for google to have some options similar to Java for both Android, and their in-house server-side code. (Oracle anyone?)
- stesch 14y agoIt's compared to V8. And V8 is a monster. See the benchmark games: http://benchmarksgame.alioth.debian.org/u64/benchmark.php?test=all&lang=v8&lang2=hipe http://benchmarksgame.alioth.debian.org/u64/benchmark.php?te...
- rayiner 14y agoV8 has quite a ways to go against state of the art 1990s technology: http://benchmarksgame.alioth.debian.org/u64/benchmark.php?test=all&lang=v8&lang2=sbcl http://benchmarksgame.alioth.debian.org/u64/benchmark.php?te... What's crazy to me is that SBCL still stands up toe-to-toe with say Mono (3.x, using LLVM) (or GHC or the JVM): http://benchmarksgame.alioth.debian.org/u64/benchmark.php?test=all&lang=csharp&lang2=sbcl http://benchmarksgame.alioth.debian.org/u64/benchmark.php?te.... This is a compiler that hasn't even heard of SSA, nor any other advance in low-level optimizations in the last 15-20 years. It also achieves parity with Java on binary-trees, even though that's basically a GC benchmark and SBCL has a fairly primitive one. It's a testament to the power of a well-tuned compiler using relatively simple algorithms and a language that is pretty amenable to optimization despite being highly dynamic.
- munificent 14y ago> Doesn't a 30% performance improvement (I'm just talking dart vs. JavaScript, not dart2js generated code vs JavaScript) seem like a pretty weak result given that they've created a new language? Well keep in mind that every other language that compiles to JS is generally slower, so any improvement here is pretty impressive. Note that this is just the performance of the Dart code compiled to JavaScript. Dart code running on the native Dart VM has very different, better perf.
- reeses 14y agoThat's what the parent poster is saying with "(I'm just talking dart vs. JavaScript, not dart2js generated code vs JavaScript)". If you look at the graph, the top line (dart vm) is running about 400-500 "Runtime Score". V8's moseying along at ±300. What he or she is wondering is why one would bother with dart if it's not much, much more Runtime Scorey than JavaScript (V8).
- xxgreg 14y agoOn the Richards benchmark it's 1.9x. After 2 years this is pretty impressive. Due the nature of the Dart language the DartVM will make a number of optimizations possible that are not even possible in V8. So it will be a better platform for continued performance improvements. Time will tell... To be honest, even if it was only doing 0.5x, I'd still use it because the tooling makes me more productive. http://www.dartlang.org/performance/ http://www.dartlang.org/performance/
- rdtsc 14y ago> but still. Why the "still"? If I don't have to use JS then it is worth it even if it was about the same speed.
- ahoge 14y agoDart's biggest selling point is that it's very nice to use and that it's free of nasty surprises. Have you ever written a somewhat bigger JavaScript application with a few thousands lines of code spread across dozens of files? It's horrible. With Dart, the experience is similar to Java or C# (just with terser syntax). There are classes/packages, and you can simply import things. In the IDE you get call-tips, auto-complete, and sanity checks (based on type annotations or inferred types). There is very little friction in general. There is also block scope, a lexically scoped `this`, built-in classes/inheritance, mixins, lambdas, and things like that.
- ahoge 14y agoWhere do those 30% come from? DeltaBlue: 100 / 320.84 * 512.74 = 159.81 -> +60% Richards: 100 / 444.00 * 814.09 = 183.35 -> +83%