For the latest Dart news, visit our new blog at https://medium.com/dartlang .
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...