Thursday, September 18, 2008

SquirrelFish Extreme has landed!

It's been a long time since my last post on this blog. I really was meaning to update everyone on my progress throughout the Summer of Code, but that plan sort of fell apart when I got busy with school and my Summer of Code project.

One of the biggest things to happen in the WebKit world recently is the introduction of SquirrelFish Extreme, which just hit the WebKit blog a short while ago. That post contains a good overview of the ideas involved in SquirrelFish Extreme, so I won't go into any further detail here, besides saying that I have had a fun time working on the project with the other members of the WebKit team.

The WebKit blog is missing benchmarks comparing SquirrelFish Extreme to other JavaScript engines, which is understandable. However, people always love to see these sorts of numbers, so I'll post them here.

The three most competitive JavaScript engines are the SquirrelFish Extreme engine in WebKit, the V8 engine in Google's Chrome browser, and the TraceMonkey engine that is slated to appear in Firefox 3.1. I used the latest development version of each, from the respective SVN or Mercurial repository. In particular, the version of V8 used here is the bleeding-edge branch, which is a bit faster than the version that shipped with Chrome. Here are some SunSpider numbers on my 2.16 GHz MacBook Pro, using 50 runs with a 95% confidence interval of +/- 0.1%:

SquirrelFish Extreme:943.3 ms
V8:1280.6 ms
TraceMonkey:1464.6 ms

As you can see, SquirrelFish Extreme is 36% faster than V8, and 55% faster than TraceMonkey. The last time I posted benchmark numbers, people wanted to see Opera's numbers as well. The beta of Opera 9.6 runs SunSpider in 6394.2 ms. I can't run Opera's JavaScript engine from the commandline, so it is taking a minor penalty for the benchmark being run in a browser, but the difference between Opera and other JavaScript engines is so drastic that the point is clear either way.

We are definitely in an interesting time for browser development. Everybody is working hard to improve performance, standards compliance and stability. The end result will definitely be a more open web, with richer content and more advanced applications than in the past.

Monday, June 2, 2008

SquirrelFish has landed!

Hey, everybody. I’m a Google Summer of Code student this year, working on performance improvements for JavaScriptCore, WebKit’s JavaScript interpreter. The official WebKit blog just announced SquirrelFish, our incremental rewrite of JavaScriptCore. In just about two months, we went from an AST-based interpreter to an optimized bytecode interpreter, achieving a substantial performance improvement in the process. Ever since it landed, people have been asking for comparisons between bleeding edge versions of the leading browsers, so here are some SunSpider numbers:

WebKit r34318:2248.0 ms
Firefox 3.0 RC1:3288.0 ms
Opera Snapshot 4844:6012.2 ms

This means that WebKit is 1.46 times faster than Firefox, and 2.67 times faster than Opera. The machine I used for testing is a 2.16 GHz Core 2 Duo MacBook Pro running Mac OS X 10.5.3.

The development process was a real blast. I got a chance to work with some great programmers while improving software that is widely used. There isn’t much more that one can ask for in the world of open source, or software development in general. We really worked well as a team, helping one other with writing patches, code review, running performance tests, and just giving general encouragement. I was finishing my master's thesis at the same time, so there wasn’t a dull moment in my life.

Much of this work was done before the accepted students for Summer of Code were announced, and the SquirrelFish branch merged a few days before the program officially started, so I think I’ve been doing a pretty good job on my project so far. Since the merge, we have been brainstorming further performance improvements, and we are getting to work on implementing them. I'll try to post about some of the things we do on this blog from time to time.