Simon Willison’s Weblog

Subscribe

Tamarin

9th November 2006

On Tuesday, the Mozilla Foundation and Adobe announced the Tamarin project, an open-source ECMAScript virtual machine based on the ActionScript engine used by Flash Player 9.

Frank Hecker’s overview of what this means is useful, but the Tamarin source code itself provides this interesting piece of historical insight:

AVM+ is the ActionScript Virtual Machine

AVM+ offers an order of magnitude performance increase over the “Classic AVM” in Flash Player 7. Our performance target is 10X.

AVM+ implements ActionScript 3.0, the new version of the ActionScript language that is compliant with the ECMAScript Edition 4 standard.

AVM+ is also built for modularity. It will be part of the Flash Player, but is a self-contained module which can be incorporated into other programs with ease. It may also be submitted to the ECMA standards organization as a reference implementation of ECMAScript Edition 4.

Adobe’s reputation for solid engineering shines through here—it seems that what is now Tamarin was designed for integration with other applications from the very start.

The most important thing we can expect from this is a serious improvement in JavaScript performance in the Mozilla family of products, thanks to Tamarin’s JIT compiler that can convert ECMAScript bytecode to machine code at runtime. JavaScript/Ajax applications will run faster, and the Mozilla applications themselves will perform better as much of their UI is written in JavaScript and XUL.

This performance boost will benefit other applications as well. Tamarin is being integrated with SpiderMonkey, which is used in a variety of applications such as the Yahoo! Widget Engine.

Reading through Brendan Eich’s technical overview of Mozilla 2, it looks like the Mozilla team also plan on taking advantage of this performance boost to move code from C++ to JavaScript 2 in many places, simplifying their code base and reducing the likelihood of security flaws in the code.

Even in these buzzword filled days of Ajax and Web 2.0, JavaScript is still seen as a poor cousin to so-called “real” programming languages. With a high performance open-source VM like Tamarin available, maybe more developers will start to re-examine JavaScript’s role outside the browser.

Previously hosted at http://simon.incutio.com/archive/2006/11/09/tamarin