Daniel Eran Dilger
Random header image... Refresh for more!

SquirrelFish Extreme promises to speed JavaScript in Safari 4.0

Prince McLean, AppleInsider
Last night, Apple’s WebKit group announced the new SquirrelFish Extreme, a major new retooling of the SquirrelFish JavaScript engine originally announced in June. The update comes before SquirrelFish even had the time to make it into production versions of Safari.
SquirrelFish Extreme promises to speed JavaScript in Safari 4.0
After Apple announced the original SquirrelFish as a project, Mozilla released TraceMonkey for FireFox and Google unveiled the new V8 engine in Chrome, making the acceleration of JavaScript one of the most competitive and rapidly advancing targets on the computing landscape today.

The need for accelerating JavaScript is a coming wave of sophisticated new web applications, including Apple’s own MobileMe web apps built using the SproutCore JavaScript framework. Safari 4.0, now in beta, will incorporate both SquirrelFish Extreme and support for new HTML 5 features described earlier.

Apple’s enhancements in SquirrelFish Extreme include “bytecode optimizations, polymorphic inline caching, a lightweight ‘context threaded’ JIT compiler, and a new regular expression engine that uses our JIT infrastructure,” according to a Surfin’ Safari post by Maciej Stachowiak.

SquirrelFish Extreme

In SunSpider benchmarks, the new SquirrelFish Extreme is “nearly twice as fast as the original SquirrelFish, and over 10 times the speed you saw in Safari 3.0, less than a year ago,” Stachowiak wrote. “We are pretty pleased with this improvement, but we believe there is more performance still to come.”

  • Nick Barron

    Exciting times ahead in the browser arena, looking forward to the competition and advances :)

  • BigDan

    Anyone know this performance compares to IE8?

  • http://www.adviespraktijk.info Berend Schotanus

    Great news. I am very curious to hear more about competition in this field. There’s a lot of questions like:

    Why do open source platforms compete instead of cooperate?

    Apple could have used Google’s V8, why don’t they do it?

    In what ways is Google’s Chrome pushing up competition and forcing Apple to react? (or the other way around?)

    What (hidden) interests are at stake?

  • NormM

    Daniel — Shouldn’t there be a link here to your AppleInsider article?

  • FloydThreepwood

    Schouldn’t you write ‘Webkit Team’ instead of ‘Apple’? There are many great guys working hard on improving Webkit and many of them are for free.

  • solipsism

    Berend Schotanus, wrote “Why do open source platforms compete instead of cooperate?”
    — Companies are behind open source. Without corporate sponsorship open source is unlikely to get very far.

    “[WebKit] could have used Google’s V8, why don’t they do it?”
    — Chrome just came out, and it’s only for Windows right now so WebKit hasn’t had much time to sift through V8 yet. But since SquirrelFish Extreme easily trumps Chrome’s V8 there isn’t a reason for WebKit to drop a better system. Even if it bested SFE there still would be no reason for Webkit to adopt it unless the lead was severe and SFE couldn’t be made faster.

    “In what ways is Google’s Chrome pushing up competition and forcing Apple to react? (or the other way around?)”
    — Google entering the browser market with WebKit is great for Apple and WebKit. While web developers can easily dismiss Apple’s Safari as being an elitist browser on an elitist OS, they can’t ignore Google. While Apple’s growth in the both the PC and smartphone markets would have eventually forced web developers to consider WebKit, Chromes foray will speed up this inevitable transition considerably, as well as force MS to get IE even more standards compliant faster.

    “What (hidden) interests are at stake?”
    — I see no hidden interests in the aspects of V8, but Google obviously wants to have a browser since its entire business model is browser based. If you use Google to do a search they are no longer paying Mozilla or Safari for those in-browser searches, but that is probably chump change to Google. I think Google may be using this as an initial test for their dumb terminal, internet boxes that Cringely talked about so many years ago.

  • JulesLt

    >Why do open source platforms compete instead of cooperate?
    Some people actually work on both Mozilla and WebKit, and of course Chrome (WebKit) shares lead members with Camino (Mozilla).

    That doesn’t answer the overall question, but I think the answer is that ‘it works’. A lot of people asked why Apple had gone with KHTML over Mozilla and shouldn’t they be putting their weight behind making Firefox rival IE, etc, but I think these days we’re all seeing the benefits of having three standards compliant browser engines competing with each other.

    The Acid3 competition was cool, and the new focus on JavaScript performance is equally positive.

    >Apple could have used Google’s V8, why don’t they do it?
    The first version of Squirrelfish came out before V8 was publicly announced, while Extreme has been released 10 days later. You’re not simply going to replace your VM because something offers a temporary advantage for a few days. I’ve not paid enough attention to be able to see what the fundamental differences between the two are.

    I’m presuming V8 was something Google backed some time ago when Apple/WebKit’s hadn’t made any public indication of direction with JavaScript (which until recently seemed to be neglected compared to CSS3 and HTML5). I did look around the time Tamarin was donated to Mozilla to see what the WebKit reaction was, but not a lot.

    >What (hidden) interests are at stake?
    At a hunch – Google want the ability to tune the JavaScript engine to work well with their web apps. They know what language features they use heavily, so could modify the runtime to support them well, just as Apple could optimise to make Sproutcore based apps run better. I’m guessing Google also see V8 as being good for Android??

  • Pingback: Stef’s blog » Blog Archive » About running JavaScript speed()

  • Pingback: Talking about my job at Talend » About running JavaScript speed()