Round #4374 of the JavaScript performance wars has just been completed and the winner this round is SquirrelFish Extreme. For those who aren’t “in the know”, here’s a quick recap.

  • Safari, Apple’s browser, is based on WebKit, the open source project headed by, yes, Apple. The WebKit team is rewriting their JavaScript engine and has created a brand new one named SquirrelFish (don’t ask). This engine is slated to appear in Safari 3.1. When announced three months back, SquirrelFish was a big performance improvement on the previous engine. They’ve named the latest development iteration SquirrelFish Extreme due to another big jump in performance. This iteration now does native code compilation.
  • Firefox’s JavaScript engine is named SpiderMonkey. Adobe, a long while back, donated their JavaScript engine to Mozilla, called Tamarin. If you’re not already aware, Flash is JavaScript and Adobe’s JavaScript engine is highly optimized. That code donation was allowed to languish for a long time. Apparantly it’s not straight-forward to implement in Firefox so a small group at Mozilla started moving some of the code into SquirrelMonkey and created the Tamarin-SquirrelMonkey hybrid called TraceMonkey.
  • Then came Google out of nowhere with V8. V8 was developed in secret and unleashed whole upon the web. V8 compiles everything to native code. At release Google stated that V8 was far faster then everyone else’s JavaScript engine.
  • IE. IE 8 has some performance improvements. That moves them from 20 times as slow as the new engines to 19 times as slow as the new engines.
  • Opera. No, seriously, some people still use this thing. Opera used to be the JavaScript smackdown king. No more. They’re now 6-8 times as slow as the new engines.

At this point, the Safari, Firefox and Google teams all state that they can see obvious ways to improve performance even further. The IE and Opera teams say nothing. A quick aside, the .Net platform has provable capability to run dynamic languages like Python and Ruby. As far as I am aware there’s nothing keeping Microsoft from implementing JavaScript on .Net. They’ve even got Silverlight as the proving ground. And .Net is already performant. They’re either doing this in secret right now or the IE DOM (that’s the internals of the browser) can’t be hooked into it - in which case they’re screwed.

And that, finally brings us back to the joking subject line. How fast will JavaScript get? My guess is it’s going to be as least as fast as Python, which isn’t Java/C# fast but’s its still pretty good. And it will be faster then Ruby. There are web frameworks and app servers written in Python and Ruby right now. Someone, somewhere is going to write an app server in JavaScript. And that will just be weird.