Getting Faster With TraceMonkey

Mike Shaver has an awesome blog post on work to speed up JavaScript. Granted Firefox 3.0 is pretty fast already, 4.0 is shaping up to put 3.0 to shame. For those who don’t want to read it all, here’s what you really should know:

The goal of the TraceMonkey project — which is still in its early stages — is to take JavaScript performance to another level, where instead of competing against other interpreters, we start to compete against native code. Even with this very, very early version we’re already seeing some promising results: a simple “for loop? is getting close to unoptimized gcc[.]

That is a very impressive feat, and even more impressive is that it’s so early on. Schrep has a demo for anyone who still doesn’t see what this really means for future web applications.

Brendan has a great blog post with some more details on what has been done so far, as well as some more graphs.

The first thing that comes to mind is that it makes <canvas /> much more useful. While it already is handy, one of the big problems is that it doesn’t take to much to make it feel slow.

I think the real benchmark for most people these days is Gmail and Yahoo Mail, which are likely the two most JavaScript intensive applications most people use on a daily basis. Most people saw a nice gain when moving to Firefox 3.

Considering a substantial part of the browser chrome is implemented in JavaScript, this work has significant impact in the future performance of the browser as well as the web applications that run within it.

This all comes just a matter of hours after querySelectorAll landed, which will also give a boost in performance as John Resig explains.

A few months ago I mentioned SquirrelFish, the WebKit teams attempt to improve JavaScript performance. It’s great to see performance being such a focus.

It’s important to note that this isn’t just about making things feel faster, it opens up the web to handle things that previously couldn’t be done before. It also paves the way for a better mobile experience. Two fantastic things. Things that previously a browser just couldn’t do as well as a desktop application will become possible in the not to distant future.

One thought on “Getting Faster With TraceMonkey

  1. Pingback: Home of KaiRo: How Fast Is TraceMonkey In Real World?

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>