Skip to main content

Posts

Showing posts with the label performance

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

Announcing Dart 2.1

The Dart 2.1 release is now available. This update to Dart 2 offers smaller code size, faster type checks, better usability for type errors, and new language features to improve productivity when building user experiences. See our  Medium post  for the full announcement.

Announcing Dart 2 Stable and the Dart Web Platform

The stable release of Dart 2 is now available, including a rewrite of the Dart web platform that offers a unique combination of productivity, performance, and scalability. See our  Medium post  for the full announcement. hnpwa.dartlang.org

Dart 1.22: Faster tools, assert messages, covariant overrides

Dart 1.22 is now available. It introduces a sync/async union type, assert messages, covariant parameter overrides, and much more. Tool startup is now much faster. Get it now! Faster tool startup We have switched to using application snapshots for running our SDK tools like dart2js, analyzer, and pub. This improves startup performance. See the AOT compiling talk  at Dart Dev Summit 2016 for more information. Information about how to use application snapshots can be found in the SDK wiki . Here are the improved performance numbers we see with the switch. Assert messages The fail-fast  principle is crucial for building high-quality software, and assert  is the simplest way to fail fast. But until now, it wasn’t possible to attach messages to asserts, so if you wanted to make your error useful, you were forced to throw a full exception. Like this: num measureDistance(List waypoints) { if (waypoints.any((point) => point.isInaccessible)) { throw new Ar...

Why dart2js produces faster JavaScript code from Dart

The dart2js compiler, which converts Dart to JavaScript, now produces smaller and faster code thanks to its global type inferencer. By analyzing the entire program, the compiler can eliminate bailouts and redundant checks, resulting in code that runs faster on modern JavaScript engines. As evidenced by the graph below, the performance of the code generated by dart2js (the purple line) now slightly outperforms the original hand-written benchmark code (the gold line). The Dart VM, which natively runs Dart code, is the top line. High is better in this benchmark ( Dart code , JavaScript code ). Taken on 2012/03/28. From dartlang.org/performance Type inferencing helps performance Nicolas Geoffray, engineer on dart2js, has been working on the beginnings of the global type inferencer. In a recent interview ( video ) he showed examples of the original Dart code, the previously generated JavaScript code, and the new more optimized JavaScript code. Code gets smaller, faster Fo...