According to http://code.google.com/apis/v8/run.html Chrome’s javascript engine is 10 times faster than Firefox 3.0. 1152 (Chrome) vs 110 (Firefox). Although they both take about 8 seconds to run on my machine. This is the danger of benchmarks. You can optimise for any benchmark but the real trick is in choosing which benchmarks to optimise for. And you ignore ‘user time’ at your peril. As a browsing human, I don’t really care how many milliseconds New and Improved Browser shaves off Brand X’s benchmarks. I care about how long I’m waiting for the hourglass to disappear or the spinny thing to stop spinning.
As a developer, of course I went off and found the webkit benchmark. Results below, in all their ugly unformatted glory:
TEST COMPARISON FROM TO DETAILS
=============================================================================
** TOTAL **: 2.28x as fast 5387.6ms +/- 0.6% 2358.2ms +/- 0.2% significant
=============================================================================
3d: 3.69x as fast 621.6ms +/- 1.1% 168.6ms +/- 4.0% significant
cube: 5.35x as fast 229.0ms +/- 1.3% 42.8ms +/- 11.5% significant
morph: 2.88x as fast 205.4ms +/- 1.4% 71.2ms +/- 5.7% significant
raytrace: 3.43x as fast 187.2ms +/- 2.1% 54.6ms +/- 3.1% significant
access: 6.93x as fast 885.6ms +/- 0.9% 127.8ms +/- 4.3% significant
binary-trees: 13.7x as fast 112.6ms +/- 0.6% 8.2ms +/- 12.7% significant
fannkuch: 8.92x as fast 401.2ms +/- 0.1% 45.0ms +/- 2.0% significant
nbody: 4.86x as fast 210.8ms +/- 2.7% 43.4ms +/- 10.0% significant
nsieve: 5.16x as fast 161.0ms +/- 1.7% 31.2ms +/- 4.4% significant
bitops: 8.42x as fast 796.8ms +/- 0.2% 94.6ms +/- 5.3% significant
3bit-bits-in-byte: 26.6x as fast 154.2ms +/- 0.4% 5.8ms +/- 17.9% significant
bits-in-byte: 17.8x as fast 217.2ms +/- 0.5% 12.2ms +/- 8.5% significant
bitwise-and: 5.51x as fast 178.6ms +/- 0.9% 32.4ms +/- 4.4% significant
nsieve-bits: 5.58x as fast 246.8ms +/- 0.2% 44.2ms +/- 7.0% significant
controlflow: 28.3x as fast 113.2ms +/- 0.5% 4.0ms +/- 22.0% significant
recursive: 28.3x as fast 113.2ms +/- 0.5% 4.0ms +/- 22.0% significant
crypto: 5.29x as fast 405.0ms +/- 0.3% 76.6ms +/- 4.8% significant
aes: 4.97x as fast 153.2ms +/- 0.7% 30.8ms +/- 6.0% significant
md5: 5.27x as fast 126.6ms +/- 1.1% 24.0ms +/- 8.2% significant
sha1: 5.74x as fast 125.2ms +/- 0.8% 21.8ms +/- 2.6% significant
date: 1.07x as fast 416.2ms +/- 1.1% 389.6ms +/- 1.6% significant
format-tofte: 1.23x as fast 261.4ms +/- 1.3% 212.2ms +/- 2.0% significant
format-xparb: *1.15x as slow* 154.8ms +/- 1.0% 177.4ms +/- 1.8% significant
math: 3.79x as fast 619.6ms +/- 1.1% 163.4ms +/- 5.6% significant
cordic: 3.24x as fast 294.2ms +/- 0.9% 90.8ms +/- 6.2% significant
partial-sums: 3.39x as fast 177.8ms +/- 2.9% 52.4ms +/- 11.3% significant
spectral-norm: 7.31x as fast 147.6ms +/- 0.5% 20.2ms +/- 2.8% significant
regexp: *1.88x as slow* 305.8ms +/- 10.1% 573.6ms +/- 0.5% significant
dna: *1.88x as slow* 305.8ms +/- 10.1% 573.6ms +/- 0.5% significant
string: 1.61x as fast 1223.8ms +/- 3.3% 760.0ms +/- 1.4% significant
base64: 1.81x as fast 154.8ms +/- 2.2% 85.6ms +/- 9.5% significant
fasta: 3.84x as fast 306.0ms +/- 2.1% 79.6ms +/- 2.6% significant
tagcloud: - 216.0ms +/- 3.5% 209.0ms +/- 1.5%
unpack-code: 1.36x as fast 378.0ms +/- 10.1% 278.2ms +/- 2.3% significant
validate-input: 1.57x as fast 169.0ms +/- 2.9% 107.6ms +/- 2.4% significant
That’s looking a bit more believable. On average Chrome/V8 seems to be twice as fast as Firefox/Spidermonkey, with results varying from 30 times faster to almost 2 times slower. It will be interesting to see how Tracemonkey compares, as it seems to be about 1.8 times faster than Spidermonkey.
If you’re not already aware, you can test using a TraceMonkey-enabled build right now — just grab a trunk build of Firefox [0]. You might also want to create a new profile [1], although it’d probably be OK to use your existing one.
[0] http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
[1] http://support.mozilla.com/en-US/kb/Profiles
I actually tested v8, tracemonkey, and squirrelfish here:
http://waynepan.com/2008/09/02/v8-tracemonkey-squirrelfish-ie8-benchmarks/
v8 is 3x faster on dromaeo and 2x faster on sunspider.
I ran a webkit.org – performance test myself yesterday at http://goit-postal.blogspot.com/2008/09/chrome-first-little-test-with-highly.html . It compares the overall time to previous tests with the same setup (http://goit-postal.blogspot.com/2008/05/javascript-core-performance-in-actual.html) so you can compare Google Chrome to FF2/FF3, IE7, Opera and Safari. Have fun!
“Although they both take about 8 seconds to run on my machine” — I think the point of the benchmark is to see how many cycles it can run in 8 seconds, not to see how quickly they can run a certain number of cycles.
I went over to John Resig’s Processing.js examples, and every example that didn’t use timed loops ended up running several times faster in Chrome than Firefox 3.
The general run time for other javascript/DOM building applications seems to be pretty much indistinguishable from Firefox 3, mostly (I think) because they’ve so far been tailored to slower browsers, so they keep things pretty simple. With this vastly-improved performance, though, I imagine developers will be more willing to create web applications that will require something as fast as Chrome to have a decent user experience.
Pingback: Google Chrome - Developers Point of View, Ideas, Issues & The Bare Truth | Ruhani Rabin
Pingback: Security Stallions Blog » Blog Archive » Friday Edition: WiR
Pingback: v8 Javascript Virtual Machine: Welcome in the new era of the web | Developer Oracles
Pingback: Noch schneller als Chromes V8: Das neue Webkit | Chrome2.de
Pingback: Recent Faves Tagged With "md5" : MyNetFaves