After using WebKit for the past few days it is evident to me that it performs better than Firefox on my Macs. The question is how much better? Is it possible to quantify the performance difference? After searching around found this JavaScript benchmarking site.
Details
The data was obtained by running the SunSpider JavaScript Benchmark.
The benchmark was run on a 2.4GHz Core 2 Duo MacBook equipped with 4 gigs of memory running Leopard (10.5.3).
To generate the below results for your self, follow the WebKit Results Link and then paste the Firefox results link in to the box that says “To compare to another run…”
TEST COMPARISON FROM (Firefox) TO (WebKit Nightly)
=============================================================================
** TOTAL **: 1.57x as fast 3002.8ms +/- 1.3% 1918.6ms +/- 0.9%
=============================================================================
3d: 1.47x as fast 383.8ms +/- 7.3% 260.6ms +/- 2.9%
cube: 1.61x as fast 135.2ms +/- 2.9% 84.2ms +/- 5.9%
morph: 1.53x as fast 126.4ms +/- 20.3% 82.8ms +/- 2.0%
raytrace: 1.31x as fast 122.2ms +/- 4.7% 93.6ms +/- 4.3%
access: 1.49x as fast 418.2ms +/- 3.4% 280.2ms +/- 4.1%
binary-trees: 1.38x as fast 49.8ms +/- 3.7% 36.0ms +/- 15.1%
fannkuch: 1.83x as fast 162.4ms +/- 4.5% 88.6ms +/- 3.8%
nbody: 1.19x as fast 149.0ms +/- 7.6% 124.8ms +/- 7.3%
nsieve: 1.85x as fast 57.0ms +/- 9.5% 30.8ms +/- 7.2%
bitops: 1.57x as fast 296.6ms +/- 3.6% 188.8ms +/- 4.5%
3bit-bits-in-byte: 1.84x as fast 49.0ms +/- 10.3% 26.6ms +/- 13.5%
bits-in-byte: 2.34x as fast 76.2ms +/- 3.1% 32.6ms +/- 8.8%
bitwise-and: 1.43x as fast 78.2ms +/- 5.9% 54.8ms +/- 4.4%
nsieve-bits: 1.25x as fast 93.2ms +/- 7.7% 74.8ms +/- 14.5%
controlflow: 1.46x as fast 39.4ms +/- 6.9% 27.0ms +/- 22.6%
recursive: 1.46x as fast 39.4ms +/- 6.9% 27.0ms +/- 22.6%
crypto: 1.44x as fast 186.8ms +/- 3.7% 129.6ms +/- 7.7%
aes: 1.59x as fast 72.4ms +/- 4.9% 45.6ms +/- 14.8%
md5: 1.45x as fast 57.6ms +/- 7.6% 39.6ms +/- 14.8%
sha1: 1.28x as fast 56.8ms +/- 9.3% 44.4ms +/- 27.6%
date: 2.12x as fast 365.8ms +/- 2.1% 172.6ms +/- 2.6%
format-tofte: 2.01x as fast 211.8ms +/- 1.1% 105.2ms +/- 3.5%
format-xparb: 2.28x as fast 154.0ms +/- 4.5% 67.4ms +/- 5.6%
math: 1.51x as fast 312.6ms +/- 4.9% 206.6ms +/- 4.1%
cordic: 1.79x as fast 121.2ms +/- 2.9% 67.6ms +/- 5.9%
partial-sums: 1.35x as fast 132.2ms +/- 9.7% 97.8ms +/- 3.7%
spectral-norm: 1.44x as fast 59.2ms +/- 8.3% 41.2ms +/- 8.6%
regexp: 1.33x as fast 265.0ms +/- 0.5% 198.8ms +/- 1.6%
dna: 1.33x as fast 265.0ms +/- 0.5% 198.8ms +/- 1.6%
string: 1.62x as fast 734.6ms +/- 0.7% 454.4ms +/- 1.6%
base64: 1.33x as fast 85.8ms +/- 1.9% 64.6ms +/- 4.0%
fasta: 2.25x as fast 192.2ms +/- 2.3% 85.4ms +/- 3.4%
tagcloud: 1.38x as fast 154.2ms +/- 1.4% 112.0ms +/- 7.2%
unpack-code: 1.67x as fast 197.8ms +/- 0.5% 118.6ms +/- 3.4%
validate-input: 1.42x as fast 104.6ms +/- 1.4% 73.8ms +/- 4.0%
As you can see from the benchmark results, WebKit performs ~1.57x’s faster. The results are pretty much in line with my browsing experience. Please keep in mind these results are very specific to the conditions of my network, my computer, and the current utilization of the web server. Your results may vary.
Disclaimer
Please keep in mind benchmarks are benchmarks, and they are nothing more than numbers. This benchmark was not chosen because it favors WebKit in any way. Several sites use it to compare not only WebKit, but other browsers on other operating systems as well. Example here.
FYI
Webkit comes in ~1.68x’s faster than Safari 3.1.1. Safari 4 should be comparable to WebKit, since Safari 4 is based on the same code base as the current WebKit build which is based on the SquirrelFish JavaScript engine.