Faster JavaScript for Firefox 3.1 Thru JIT

I was expecting the next major advance in JavaScript for Firefox to come from replacing SpiderMonkey with Tamarin, Adobe's donated VM for ECMAScript 4. In fact, Tamarin can already do some JIT.

Now surprise, surprise -- SpiderMonkey can do JIT as well, as Brendan Eich, Mozilla's CTO describes in his blog. The technique used in both Tamarin and SpiderMonkey is called tracing, where during code execution, each hotspot (code that is executed a whole lot) is traced and compiled, so the next time it is executed, the compiled version is used. The beasty is called TraceMonkey and boasts several orders of magnitude improvements over the old SpiderMonkey.

Since this JIT involved actual compilation, you have to look at which architectures TraceMonkey supports. Again from Brendan's blog:

We have, right now, x86, x86-64, and ARM support in TraceMonkey. This means we are ready for mobile and desktop target platforms out of the box.

Sweet. I guess that means the Intel Macs are supported.

There are still some bugs, of course, but this is great news for sophisticated Ajax apps on Firefox. Will Microsoft respond? Is a JavaScript JIT upgrade in the works for IE? This is an arms race I can get excited about.

Update: John Resig of JQuery has some more details and demos about TraceMonkey.

Related posts:

  1. Project Tamarin brings Adobe and Mozilla together on ECMAScript
  2. Firefox Plugin Malware ‘Trojan.PWS.ChromeInject.A’
  3. 37 JavaScript benchmarks
  4. This is Important: Tamarin in IE and Bytecode Translation
  5. Lazy headlines on the JavaScript 2 free-for-all

Comments: 2 so far

  1. [...] like it. Give me more browser improvements! With the news of Firefox 3.1’s JIT JavaScript beasty TraceMonkey, is it too much to hope that IE8 Beta 2 has some similar improvements under the [...]

    Pingback by Pathfinder Development » IE8 Beta 2 Released, Wednesday, August 27, 2008 @ 9:08 pm

  2. [...] to write a high performance chess playing program. Even with all of the performance improvements in TraceMonkey, you’re not going to be able to get that kind of speed out of current JavaScript engines. But to [...]

    Pingback by Pathfinder Development » Porting Java Libraries - Jazzed About GWT, Tuesday, September 16, 2008 @ 5:30 pm

Leave a comment

Powered by WP Hashcash

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com