6 ms·
Javascript compiled from Dart is as fast as normal Js, in some cases faster. And in the server it outperforms Node according to the Techempower benchmarks. http
by korm 10y ago
Javascript compiled from Dart is as fast as normal Js, in some cases faster. And in the server it outperforms Node according to the Techempower benchmarks. https://www.techempower.com/benchmarks/ https://www.techempower.com/benchmarks/
- themihai 10y agoIn some cases is slower. Last time I've checked large apps were freezing on safari. The point is that it's not signifiantly faster than js so I think it's safe to say that it failed its main objective.
- mswift42 10y agoDart's main objective has never been to be faster than js. Dart's goal was to make a modern, 'sane' language.
- themihai 10y agoHow is that? As far as I can remember performance was always the main reason. The main contributor previously worked on hotspot. It was argued that javascript hit the limits on performance and you need a clean slate, especially due the low power of the mobile devices. "Batteries included" and fixing the javascript syntatic issues was presented as secondary objective. This might have been changed after the VM was dropped from the project. Dart was supposed to be a response to native apps which failed miserably. It's a well design ecosystem for sure but it can't even compete with javascript, let alone native apps.
- isoos 10y agoThe keyword you are looking for is Dartium (Chrome with Dart support compiled), and if you are benchmarking a Dart app in Dartium vs. a JS app in any of the browsers, chances are the Dartium app will be faster. The technical goal was achieved, the political support lacked.
- themihai 10y agoEven with Dartium it didn't reach a speed close to native. I don't doubt that if more effort would be put in the VM the perf could get better but as it is now Dartium is no longer an option.
- isoos 10y agoDartium doesn't need to be close to native, it just needs to beat every JS engine out there; in other words: the comparison should be in the same league. Last time I've checked it did beat them.
- themihai 10y agoActually it needs because it was supposed to compete with the mobile/ios/native apps not with javascript. I don't think anyone was thinking to replace javascript with something only slightly better.
- isoos 10y agoIf you are really looking for mobile/native development in Dart, I'd suggest you to check out Flutter (https://flutter.io/ https://flutter.io/). It can achieve 60 fps on mobile apps, which is great in my view. But I doubt that you are really interested in any of these. I've got the impression that you only try to find a justification of not using Dart, which is fine, but looks a bit weird when you are masking political decisions as technical ones.
- themihai 10y agoI need someone to convince me that Dart is worth the switch and that it is safe for long terms investment. Having said that I geniunely tried Dart about 2 years ago. The plan was to try it for a small/admin app and then migrate the main app to Dart as well. Unfortunately there were issues with E2E testing; if I remember there was no Karma-like framework and on top of that the app froze several times on safari mobile. So at that time it was risky and it clearly had some technical issues. Now we know that the VM won't get into Chrome and it seems the new technologies(WASM, JS upgrades) put Dart in a difficult position. Is there any reference/complex mobile webapp 100% Dart powered?
- mswift42 10y agoThis is the original dart language announcement: http://googlecode.blogspot.co.uk/2011/10/dart-language-for-structured-web.html http://googlecode.blogspot.co.uk/2011/10/dart-language-for-s....
- themihai 10y agoYou are right. Perhaps I heard only I wanted to hear. Anyway here is a talk about performance so definitely it was marketed as a high performance language for the web too. https://www.infoq.com/presentations/Performance-V8-Dart https://www.infoq.com/presentations/Performance-V8-Dart
- Touche 10y agoDart was only created to be faster than JavaScript. Here's the leaked memo about why it was created: https://gist.github.com/paulmillr/1208618 https://gist.github.com/paulmillr/1208618 tldr; JavaScript has "baggage" and can't be made any faster than it currently is, need a different VM + language with types. Btw, the Dart creators are compiler engineers, not language designers. It explains a bit about why it has failed to catch on.
- themihai 10y agoI think this[0] summarises the main objective of Dart. Having said that I fail to see how it succeeded. Maybe it helped JavaScript evolve a bit but IOS development experience and performance is still vastly superior to Dart/JavaScript/Web. [0] `The emergence of compelling alternative platforms like iOS has meant that the web platform must compete on its merits, not just its reach. Javascript as it exists today will likely not be a viable solution long-term. `
- danellis 10y ago> not language designers They designed a language. Is there some other qualification for being a language designer?
- kaendfinger 10y agoLars Bak made V8, and both Kasper Lund and Lars Bak contributed the HotSpot VM. And if you don't consider Gilad Bracha (Who works on the Dart Language Specification) to be a language designer, you probably don't have a clue what he has done.
- isoos 10y agoThere is nothing in dart that would freeze it on safari, except that large app are slow on safari, regardless of dart. Btw. the linked benchmarks are server-side.