File Under: Software & Tools

SquirrelFish JavaScript Upgrade Gives Safari a Huge Speed Boost

SquirrelFishApple’s annual developer conference won’t kick off until June 9 but already there’s some exciting news for Mac fans. The team behind Apple’s Safari web browser have announced a new, and much faster, JavaScript interpreter for WebKit, the engine behind Safari.

WebKit’s previous JavaScript handler was no slouch, but the new engine, dubbed SquirrelFish, is up to 1.6 times faster in standard JavaScript speed tests.

That’s good news for iPhone users since SquirrelFish will no doubt make its way into Mobile Safari at some point. The speed boast in Mobile Safari should mean your favorite JavaScript-heavy apps — like Gmail and others — will run faster once SquirrelFish is added.

For now the new JavaScript engine is limited to nightly builds of desktop Safari, but once it’s stable look for a Safari update with the new features.

If you’d like more info on why SquirrelFish is fast, head over to the Surfin’ Safari blog where developer Geoffrey Garen explains the details:

SquirrelFish’s bytecode engine elegantly eliminates almost all of the overhead of a tree-walking interpreter. First, a bytecode stream exactly describes the operations needed to execute a program. Compiling to bytecode implicitly strips away irrelevant grammatical structure. Second, a bytecode dispatch is a single direct memory read, followed by a single indirect branch. Therefore, executing a bytecode instruction is much faster than visiting a syntax tree node. Third, with the syntax tree gone, the interpreter no longer needs to propagate execution state between syntax tree nodes.

Safari nightly builds can be downloaded from the WebKit site.

Or you could just wait for the SquirrelFish engine to hit Safari and spend the interim pondering the super cool logo of a somewhat drunken-looking SquirrelFish.

[via Reddit]

See Also: