4 ms·
..and here's the jsperf for the --optimize'd hello world vs. vanilla JS - http://jsperf.com/dart-hello-world-test-with-optimize/2 http://jsperf.com/dart-hello-w
by chrisohara 15y ago
..and here's the jsperf for the --optimize'd hello world vs. vanilla JS - http://jsperf.com/dart-hello-world-test-with-optimize/2 http://jsperf.com/dart-hello-world-test-with-optimize/2. 17k vs. 4M for me
- sjs 15y agoGot any useful benchmarks? Nobody is wondering which language to write their next "hello world" app in. Just for the record I'm not saying Dart is amazing and everyone should use it, all I'm saying is that we should evaluate it objectively. If raw speed is your bottleneck then why are you wasting time evaluating Dart? Nobody is forcing anyone to use it, you can ignore it and move on with your day.
- chrisohara 15y agoDart won't be supported ubiquitously any time soon (if ever) which is why there'll always be a Dart->JS compiler. Why not just stick with vanilla JS or Harmony/ES6? I'd benchmark some bigger apps but they don't exist yet
- swannodette 15y ago...and your benchmark makes no sense. You're creating the entire Dart environment every time.
- deleted 15y ago[deleted]
- swannodette 15y agoWhich is a one time cost - and roughly the same you pay for including any other framework out there.
- chrisohara 15y agoSame results: http://jsperf.com/dart-hello-world-test-with-optimize/2 http://jsperf.com/dart-hello-world-test-with-optimize/2
- cdata 15y agoLet's be realistic with ourselves here: is all that overhead ever going to compete with ten lines of "low level" (ha..) JavaScript? No. The problem here, and what is making us chuckle so much, is that the project as presented to us is not magical. For whatever reason, some of the brightest minds in our industry have not presented us (at this time) with a cross-compiler that is both robust enough to support large apps, and intelligent enough to self-optimize its output. Were we expecting a JavaScript killer from Google? Some of us were, with cynical apprehension. Did this release of the project live up to that expectation? Nope. Could others have done a better job? Maybe, maybe not. Could this project improve over time? Certainly. Will Dart become a JavaScript killer without more magic in its cross-compiler? Personally, I doubt it. Tooling may matter for developing large web apps, but performance matters in those large web apps too; running this test in my iPhone's browser leaves me feeling meh.
- swannodette 15y agohttp://jsperf.com/dart-hello-world-test-with-optimize/5 http://jsperf.com/dart-hello-world-test-with-optimize/5 I moved things around so that what code does is roughly equivalent. As you can see Dart is slower, but the Dart runtime does not differ by a margin that matters for many applications - and note the size of the gap differs significantly between JS engines.