scriptNode

Web development with a focus on JavaScript RSS

Google Chrome Benchmarks

Intermediate Matt Hackett Published September 2nd, 2008 by Matt Hackett

So unless you've been living under a rock, you've probably heard about the release of Google Chrome. Being a hardcore Firefox nut myself, I'm not just skeptical, I'm largely indifferent. With Firebug, I've got the perfect web developer environment, so I'm good to go. It would be hard to sell me on something else.

Google is a buzzworthy company, though, and I've already heard from everyone and their mom about how simple, clean and (most notably), fast the browser is. This piqued my interest. Time for more benchmarks!

I really thought I'd published more benchmark articles by now, but there were only two, so amending them was quick and easy. Here are the results:

Try... Catch Benchmark

This benchmark was setup to see how quickly the standard browsers could execute code that was throwing (and catching) errors. Read the full article here.

Browser Solo With try...catch With try...catch and an error
Firefox 2 36 milliseconds 47 milliseconds 32.917 seconds
Firefox 3 3 milliseconds 4 milliseconds 156 milliseconds
Google Chrome 0 milliseconds 6 milliseconds 69 milliseconds
Internet Explorer 6 33 milliseconds 35 milliseconds 209 milliseconds
Internet Explorer 7 33 milliseconds 35 milliseconds 178 milliseconds
Opera 6 milliseconds 10 milliseconds 3.011 seconds
Safari 3 13 milliseconds 16 milliseconds 50 milliseconds

As you can see, Chrome is among the highest performers. It executes the plain code insanely fast (never more than 1 millisecond in any of my tests), and is only second to Safari 3 in terms of catching errors quickly.

Conditional Benchmarks

This benchmark is a little more abstract. The objective was to determine which conditional is fastest among if, switch and what I call an object conditional.

Browser if block switch statement object conditional
Firefox 2 444 milliseconds 425 milliseconds 310 milliseconds
Firefox 3 50 milliseconds 38 milliseconds 42 milliseconds
Google Chrome 11 milliseconds 11 milliseconds 20 milliseconds
Internet Explorer 6 353 milliseconds 347 milliseconds 290 milliseconds
Internet Explorer 7 375 milliseconds 381 milliseconds 344 milliseconds
Opera 9.5 50 milliseconds 55 milliseconds 54 milliseconds
Safari 3 150 milliseconds 156 milliseconds 137 milliseconds

Turns out, that was no fluke earlier. Chrome easily blows away the competition here. I might question Google's motives (and I certainly think it's a tad shady to have renewed their contract with their now-competitor and then release competing software), but I applaud their speed of my beloved JavaScript.

Read other articles tagged: , ,

Comments (34)

Thoughts?

(required)

(not shared)

© 2010 scriptNode