Thursday, December 20th, 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.












He should have thrown in Firefox 3.
I agree, comparing Opera 9.5 (Beta) & Safari 3.04 (Beta) against Firefox 2 & IE7 is not the best comparison.
It would have been better to run Opera 9.25 however that version threw NaN errors at several of the tests for me. Safari 3.0.3 locked up half way through.
I would also love to see IE6 in there.
I love firefox.
We are sandbagging a bit — Firefox 3 final betas will speed up. Not bragging, just noting some deferred perf-bug fixing going on now.
/be
I think, this test was produced by microsoft. Explorer isn’t faster then firefox and opera.
Opera 9.23 was very slow in JavaScript operations but 9.24 and higher are beautifull. Sorry, but explorer SUCKS!
IE 6.0.2900.2180 on XP Pro w/SP2:
RESULTS (means and 95% confidence intervals)
——————————————————–
Total: 55385.6ms +/- 24.4%
——————————————————–
3d: 2253.2ms +/- 6.7%
>> cube: 600.8ms +/- 4.3%
>> morph: 716.6ms +/- 9.6%
>> raytrace: 935.8ms +/- 7.1%
access: 3004.4ms +/- 7.7%
>> binary-trees: 682.2ms +/- 2.5%
>> fannkuch: 1160.8ms +/- 2.8%
>> nbody: 632.2ms +/- 19.6%
>> nsieve: 529.2ms +/- 15.3%
bitops: 2635.6ms +/- 9.4%
>> 3bit-bits-in-byte: 682.8ms +/- 20.9%
>> bits-in-byte: 619.4ms +/- 20.5%
>> bitwise-and: 726.2ms +/- 13.9%
>> nsieve-bits: 607.2ms +/- 8.3%
controlflow: 750.8ms +/- 7.3%
>> recursive: 750.8ms +/- 7.3%
crypto: 1677.4ms +/- 4.9%
>> aes: 601.0ms +/- 2.9%
>> md5: 529.0ms +/- 6.0%
>> sha1: 547.4ms +/- 7.5%
date: 1590.2ms +/- 12.1%
>> format-tofte: 776.2ms +/- 19.0%
>> format-xparb: 814.0ms +/- 5.6%
math: 2009.4ms +/- 1.5%
>> cordic: 769.8ms +/- 2.1%
>> partial-sums: 476.0ms +/- 4.6%
>> spectral-norm: 763.6ms +/- 3.3%
regexp: 454.0ms +/- 5.4%
>> dna: 454.0ms +/- 5.4%
string: 41010.6ms +/- 33.9%
>> base64: 21106.2ms +/- 67.2%
>>fasta: 917.4ms +/- 12.3%
>> tagcloud: 5007.4ms +/- 3.9%
>> unpack-code: 926.2ms +/- 4.5%
>> validate-input: 13053.4ms +/- 4.9%
Note that bitops is really testing global variables as well as bitwise ops, and global access dwarfs bitops in more than one implementation. I pinged Maciej about this the other day.
/be
Interesting to see this. I have to say I prefer Firefox before IE however.
Lennie, Web Designer currently working on the Blood Pressure Online Pharmacies project.
Note that bitops is really testing global variables as well as bitwise ops, and global access dwarfs bitops in more than one implementation. I pinged Maciej about this the other day.
/be
العاب باربي
موقع باربي