Filed under: Internet, Internet Tools
SquirrelFish could make Safari a lot faster
Safari is about to get a whole lot faster. The Surfin' Safari weblog has written about SquirrelFish, the code name (and what a code name it is) for the new interpreter for WebKit's core JavaScript engine. How much faster is it? Surfin' Safari claims that is 1.6x faster than the current interpreter, but we'll have to get our hands on it to see. They also go into detail about why it's faster, so check that out if you're interested. You'll find phrases like "...WebKit's previous JavaScript interpreter was a simple syntax tree walker," which we assume is some sort of AT-AT walker.
[Via Computer World]

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 2)
Sir. Poopy Pants said 9:32AM on 6-05-2008
Interesting stuff here. Obviously there are smart and talented people working on webkit.
Reply
Galley said 9:42AM on 6-05-2008
They need to bring this to the iPhone ASAP.
Reply
Luigi193 said 9:45AM on 6-05-2008
I saw this on the SS blog a few days ago, and the squirrelFish icon has been my IM icon since!
Reply
J D Latham said 7:12PM on 6-05-2008
looks more like a bear than a squirrel
Kyle Derouen said 7:31PM on 6-05-2008
I think moos an ass
guilt+1 said 9:52AM on 6-05-2008
[quote]What Is SquirrelFish?
SquirrelFish is a register-based, direct-threaded, high-level bytecode engine, with a sliding register window calling convention. It lazily generates bytecodes from a syntax tree, using a simple one-pass compiler with built-in copy propagation.[/quote]
Well, now I'm enlightened.
Reply
Zack S said 9:59AM on 6-05-2008
Squirrel-fish vs. tree-walkers would be an epic battle.
Reply
Eleventeen said 10:18AM on 6-05-2008
Wasn't Treewalker some kind of Marvel alternate-universe series version of Blade? (the Daywalker)?
Either that or I'm thinking something to do with Ents.
Reply
Ryan Trevisol said 10:43AM on 6-05-2008
Best. Icon. Ever.
Reply
mikepk said 11:03AM on 6-05-2008
AT-AT, LOL. You should see the development version, it's got Turbo Lasers.
As someone who writes a lot of javascript, the new competition in browsers and web applications has really allowed it to shine. I'm glad the interpreters are finally getting serious attention. I still remember reading feedback from the IE team on the complaints that their interpreter was *broken* because of it's memory leaks that basically said "why do you want to write code in javascript? If you want to write applications use a real language" I'm paraphrasing but that was their rationale for not fixing fundamentally broken stuff in IE's JScript.
Times they are a changing.
Reply
Chris said 11:17AM on 6-05-2008
I agree, best icon I've seen in a long time.
Reply
moo083 said 12:21PM on 6-05-2008
I spose I'm the only one here who has taken a class in compiler design and actually knows what hes talking about. In fact, I bet I'm the only one here who has taken a class in Syntax (as in, linguistics), so I doubly know about Syntax trees. Yay for me!
An example would be to make a tree out of: foo = bar * 2 + baz
The tree might look like:
= -> foo
-> * -> bar
-> + -> 2
-> baz
Sorry thats not too organized, thanks to ascii, but the idea is that the arguments for the equal sign are its two arguments, what its equal to and where to put it. The arguments for the multiplier are the two multiplicands, which are bar and the sum of 2 + baz, etc....
interesting stuff....
Reply
moo083 said 12:22PM on 6-05-2008
Wow, the formatting of that is totally screwed up.... oh well....
Sir. Poopy Pants said 1:44PM on 6-05-2008
Wow, are you like 5 years old? Anyone whose in their third to fourth year computer science course as an idea about what is being discussed.
moo083 said 1:55PM on 6-05-2008
Uh thanks for being a total jackass, but I only posted that after several people posted about some crazy syntax tree thing. You have to remember that not everyone here is a programmer....
Asshole....
Luigi193 said 2:28PM on 6-05-2008
Pat yourself on the back much?
moo083 said 2:31PM on 6-05-2008
I was trying to be goofy, not be an ass. In fact if you noticed, I was trying to be helpful. I'm patting myself on the back as much as a teacher would, because thats what I was trying to do. Help teach someone something. I'm sorry you didn't get anything out of it, but theres no reason to be rude.
David said 7:11PM on 6-05-2008
moo083, your mistake was that you tried to explain something on the Internet. The Internet is full of retards who lash out against knowledge. But, thanks for the explanation. It was informative.
Scott Lembcke said 1:14PM on 6-05-2008
Actually it's probably an LALR Walker. :p
http://en.wikipedia.org/wiki/LALR_parser
Reply
sam said 1:29PM on 6-05-2008
You don't have to wait to get your hands on squirrelfish, as it's in the latest webkit nightly.
I did some speed comparisons on my blog if you're interested: http://gthing.net/new-javascript-engine-in-webkit-nerd-stuff/
THe bottom line is that the latest webkit nightly executes javascript nearly twice as fast as safari. Firefox 2, 3 Beta, opera, and internet explorer aren't even contenders - some 10x slower than webkit.
Reply