Feeds

Dart 1.1 bullseyes JavaScript performance in latest benchmarks

Compiled apps now match or beat handwritten JavaScript

Top three mobile application threats

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. ®

Maximizing your infrastructure through virtualization

More from The Register

next story
Apple fanbois SCREAM as update BRICKS their Macbook Airs
Ragegasm spills over as firmware upgrade kills machines
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
Mozilla fixes CRITICAL security holes in Firefox, urges v31 upgrade
Misc memory hazards 'could be exploited' - and guess what, one's a Javascript vuln
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Captain Kirk sets phaser to SLAUGHTER after trying new Facebook app
William Shatner less-than-impressed by Zuck's celebrity-only app
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
EU dons gloves, pokes Google's deals with Android mobe makers
El Reg cops a squint at investigatory letters
Chrome browser has been DRAINING PC batteries for YEARS
Google is only now fixing ancient, energy-sapping bug
prev story

Whitepapers

Top three mobile application threats
Prevent sensitive data leakage over insecure channels or stolen mobile devices.
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.
Application security programs and practises
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.