andrew.hedges.name / blog

V8: neither all that nor a bag of chips

11 September 2008 · Estimated reading time: 3 minutes

I just got an interesting result comparing Google Chrome to the latest WebKit nightly build. WebKit was nearly twice as fast as Chrome at completing the little suite of JavaScript unit tests I keep here at work. Is V8—Chrome’s much-touted JavaScript engine—neither all that nor a bag of chips?

When I read the comic, I got a mighty tingling sensation at the prospect that Google Chrome was going to change everything.

If Google’s own benchmark results were true, its JavaScript engine was going to be so fast, it was going to force all other browser vendors to cry “uncle” like the schoolgirls they are. Using Chrome was going to give you that “new sneakers” feeling you had as a kid when you got a new pair of shoes and knew they made you faster.

Now, like some others, I’ve come to the conclusion that V8 (despite the hype) is only evolutionary—not revolutionary—and has probably already been surpassed by at least one other major browser.

Run the tests for yourself.

Chrome versus WebKit
Chrome versus WebKit

Did you run the tests? Did you notice the little line at the bottom of the results that said “Elapsed time”? On my system, Google Chrome ran this collection of JavaScript significantly slower than did last night’s build of WebKit, which includes the brand new SquirrelFish Extreme JavaScript engine.

For the sake of completeness, I also downloaded the latest build of Firefox. After enabling TraceMonkey, their hot poop JavaScript engine, it sill took twice as long as WebKit to complete my test suite. Folks, I think we have a winner! (At least for this week…)

Lots is being written on the topic of JavaScript speed at the moment. In fact, you can find articles to support whatever flavour you favour.

I guess the moral of the story for me is that all three teams (that is, Chrome, WebKit, and Mozilla) are locked in a heated battle for JavaScript speed bragging rights, and that can only benefit us all in the end. It’s good for end-users because faster is better. It’s good for web developers because it opens up possibilities for a little more “R” in our RIAs.

The elephant in the room, yet again, is why—with all of their vast engineering weight behind it—does Microsoft’s Internet Explorer (the browser still saddling web developers everywhere) so truly suck? Maybe all of this innovation will shame them into getting with the program. Yeah, right. Call me cynical, but that makes me want to break out in song.