John McCutchan, after a long career spent working on the Linux kernel and being hired out as a code optimization guru, joined Google’s Dart team. A curious hire until you watch Bringing SIMD to the Web via Dart, where John makes a programmer accessible explanation of why he likes Dart: performance, performance, performance.
Dart is an open-source Web programming language developed by Google. The motivation for Dart is twofold: provide a language capable of scaling up to the complex web applications that are becoming the norm. Think Gmail. And provide a single language capable of working on both the client and server. Towards those ends Dart is a complete language, full tool environment, and provides an advanced Web UI framework for building web applications at a high level of abstraction.
John’s pitch is that despite many assertions to the contrary, the web is not fast. For example, when comparing the performance of a 2D physics engine across C and the web, the web version is 20x slower than C. Java is twice as slow as C. So the browser is not fast. Dart and the new libraries it supports can close that gap, allowing for the development of high performance applications in the browser.
You may be wondering which of the gazillion web frameworks to use and Dart may just be on the edge of your radar. If so this is an excellent video to take a look at.
Why might you like Dart? Here’s John’s list:
Loves structure and static type checking. Dart has a type system. Strangely though the type system is enforced by tools, it’s not a property of the language.
Semicolons are required.
Newly written from scratch VM that is designed specifically for Dart and is designed to be fast.
Distinction between growable and fixed sized arrays. If you know the size of an array ahead of time then you can make it fixed sized array, which gives Dart more optimization opportunities.
The rest of the talk is quite interesting and is about him porting SIMD to Dart. SIMD means single instruction multiple data, which means an operation is applied in parallel to an array of data rather than to one piece of data at a time. This makes areas like 3G graphics, 3D physics, image processing, signal processing, and numerical processing, blisteringly fast. Which means you can get console level performance in the browser.
As the point of this post is a quick hit on Dart, you can see the rest of the SIMD talk on the video.
Is Dart The Future?
- Google I/O 2012 – Dart – A Modern Web Language
- Dart benchmarks - it is fast