Feeds

Dart 1.1 bullseyes JavaScript performance in latest benchmarks

Compiled apps now match or beat handwritten JavaScript

Securing Web Applications Made Simple and Scalable

Just two months after shipping the first production-ready version of Dart, its JavaScript competitor, Google has offered up a new version that it claims can output code that runs as fast or faster than the equivalent routines written in JavaScript.

Dart has always been fast when running in a native VM. In fact, Dart benchmarks running in Dart VM have consistently outperformed the equivalent JavaScript running in Google's own V8 JavaScript engine. But almost nobody runs client-side Dart applications this way in the real world, because no mainstream browser currently ships with Dart VM. Instead, production Dart web apps are typically "compiled" into JavaScript using dart2js, the Dart SDK's code translator.

That hasn't always worked out so well. Past versions of dart2js have generally produced code that runs slower than it would if the same routines had been hand-written in JavaScript. But according to a blog post by Google developer advocate Seth Ladd, Dart 1.1, which Google released on Thursday, has all but closed that gap.

"Dart2js now generates JavaScript that performs as well as, if not better than, the idiomatic JavaScript equivalent," Ladd wrote.

When compiled to JavaScript, Dart 1.1's performance on the Richards benchmark – a torture test designed to compare the efficiency of systems programming languages – is up 25 per cent when compared to Dart 1.0. Its performance on the more recent FluidMotion benchmark has doubled. You can see the full results of Google's benchmark tests on the Dart project's performance page, here.

Improving client-side performance wasn't the only focus of the new release, either. Ladd said there is growing interest in using Dart for server-side applications – presumably, because it's easy to run Dart VM on a server, among other reasons – and Dart 1.1 includes a number of new features designed to accommodate this.

The new release now supports large files, file copying, process signal handlers, accessing output terminal information, and the UDP networking protocol – the latter of which should make it easier to write streaming media applications in Dart.

In addition, Dart's HTTP stack has been optimized since the last release, latency has been decreased for many I/O operations, and performance of asynchronous operations has been improved.

Dart 1.1 also bundles a souped-up Dart Editor that improves debugging and code completion and offers more descriptive tooltips, in addition to various performance enhancements.

Google has updated the Dart language spec to coincide with this release and it has also published new developer how-tos on writing command-line applications, Dart-JavaScript interoperability, and using data streams.

If you're the type who prefers to just dive right in, however, you can download all of the updated tools, including dart2js and the improved Dart Editor, from the Dart homepage, here. ®

Bridging the IT gap between rising business demands and ageing tools

More from The Register

next story
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Mozilla fixes CRITICAL security holes in Firefox, urges v31 upgrade
Misc memory hazards 'could be exploited' - and guess what, one's a Javascript vuln
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
Apple: We'll unleash OS X Yosemite beta on the MASSES on 24 July
Starting today, regular fanbois will be guinea pigs, it tells Reg
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
prev story

Whitepapers

Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Seven Steps to Software Security
Seven practical steps you can begin to take today to secure your applications and prevent the damages a successful cyber-attack can cause.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.