Browser JavaScript performance leapfrogged again

The race for the JavaScript performance crown is heating up to an almost absurd extent.

Back In June, Apple’s Safari browser was updated with their “SquirrelFish” JavaScript interpreter, providing a huge boost to JavaScript performance that actually put Safari ahead of Tamarin, the JavaScript engine used in Adobe Flex. 

Then, just weeks ago Google released Chrome, including a JavaScript engine, dubbed “V8″, that delivers near-native execution speed for JavaScript code, jumping ahead of SquirrelFish.

Not to be outdone, Brendan Eich of the Mozilla Foundation announced shortly thereafter that pre-release versions of Firefox 3.1 are yet faster than Chrome.

Finally, today Apple has announced further improvements to the SquirrelFish JavaScript interpreter in Safari, more than doubling speed, and blowing by Chrome by almost 1/3.

Of course the million dollar question is, will Internet Explorer keep up?  Apparently, yes.  An in-depth analysis by John Resig of JQuery fame shows that beta versions of IE8 are at least in the ballpark, that is, within 3x of Chrome.  That may sound slow until you realize that still puts IE8 3x ahead of IE7, because the overall speed gains indicated by these announcements are over 10x.  And this is just a beta, released before the performance bar was so drastically and so visibly raised, which should provide motivation to keep up.

Microsoft has also been blogging about IE8 performance work, reportedly looking both at JavaScript performance improvements and improvements in other areas, such as IE’s rendering engine.  From personal experience tuning SmartClient, substantial rendering performance improvements will provide at least as much of a boost as JavaScript performance improvements.

But, bigger picture: the attention being paid to JavaScript performance very, very strongly indicates that all of the major browser vendors are focused on making their browsers the best Ajax platform available, including, for once, the vendors that also have a proprietary platform (Microsoft’s Windows and Apple’s MacOS).  This should be the first of many highly publicized feature, performance and tooling wars which will benefit all applications running on the open web platform. 

The next battle?  Possibly tools.  One of the most encouraging pieces of recent news is that Microsoft is adding a near-clone of Firebug to IE8, including a JavaScript profiler.  At long last, we can all move beyond “‘undefined’ is null or not an object” with an incorrect file and line number.  And it only took – what – 12 years? :)