3 ms·
Sweet... so how does Dart compare with asms.js? /me ducks :)
by _jmar777 14y ago
Sweet... so how does Dart compare with asms.js?
/me ducks
:)
- kyrra 14y agoSerious answer: The Dart2js compiler could easily take advantage of asm.js additions, and generate javascript code that uses asm.js. If asm.js does take off, all it can do is help Dart generate faster running code. Now, if we are talking about the DartVM, asm.js could be used as an argument not to include the DartVM in other browsers. But asm.js is still very much in it's infancy, so we really need to wait and see how it's adopted and how it progresses.
- _jmar777 14y agoThanks, I agree with your comments. I was mostly just trying to poke the bear, though (http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html) :)
- ryeguy 14y agoNo it couldn't. asm.js has no garbage collector. The only way to get dart running on asm.js would be to port the entire VM to asm.js, which afiak won't work since the dart JIT emits machine code at runtime.
- _jmar777 14y agoI don't think @kyrra was suggesting that Dart would compile completely to asm.js code, just parts where it makes sense (just like normal JavaScript uses asm.js only where it makes sense).
- mraleph 14y agoI think there are incomparable. Dart is not a subset of JavaScript. Dart is dynamically typed. But Dart is more than just a language now, it's ecosystem of tools and libraries.
- xxgreg 14y agoThe DartVM has supported for typed arrays too, so it probably wouldn't be much work to hack emscripten to generate Dart source code. It would be very interesting to see a benchmark of emscripten/SomethingMonkey/asm.js vs emscripten/DartVM. (Could also add emscripten/dart2js/V8 for giggles)