Wednesday, December 26, 2007

JavaScript Benchmarks

 

Can JavaScript performance become a big selling point for browser acceptance? That’s what Jeff Atwood is speculating as he put several browsers through the WebKit SunSpider JavaScript Benchmark. The tests evaluate the performance of a browser’s implementation of JS language only and claims to be a real world, balanced and statistically sound testing suite.

Jeff put IE 7, Firefox 2, Opera 9.5 & Safari 3.0.4 through the benchmark to determine who had the best performance.


Image from Jeff Atwood’s posting.

What surprised me here is that Firefox is substantially slower than IE, once you factor out that wildly anomalous string result. I had to use a beta version of Opera to get something other than invalid (NaN) results for this benchmark, which coincidentally summarizes my opinion of Opera. Great when it works! I expected Opera to do well; it was handily winning JavaScript benchmarks way back in 2005. The new kid on the block, Safari, shows extremely well particularly considering that it is running outside its native OS X environment. Kudos to Apple. Well, except for that whole font thing.

More results are available for review here and you can run your own benchmark tests via WebKit’s SunSpider site.