in Articles

Squirrelfish Javascript engine in Webkit — speeds up Safari

Webkit, the rendering engine in the Safari browser just got a new Javascript engine. They are promising a dramatic increase in speed, and it seems to match up. (the bigger number the better)

Squirrelfish Webkit Graph

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. – The webkit blog

If you are running Mac and are using Safari, you can download an updated nightly Webkit build. Now you can try the new version without having to wait for Apple to release an updated version of Safari.