Content Entry

SunSpider JavaScript Benchmark

Published: 2008-02-29 Categories: Software Tags: SunSpider JavaScript WebKit

URL http://webkit.org/perf/sunspider-0.9/sunspider.html

This is SunSpider, a JavaScript benchmark. This benchmark tests the core JavaScript language only, not the DOM or other browser APIs. It is designed to compare different versions of the same browser, and different browsers to each other. Unlike many widely available JavaScript benchmarks, this test is:

Real World
This test mostly avoids microbenchmarks, and tries to focus on the kinds of actual problems developers solve with JavaScript today, and the problems they may want to tackle in the future as the language gets faster. This includes tests to generate a tagcloud from JSON input, a 3D raytracer, cryptography tests, code decompression, and many more examples. There are a few microbenchmarkish things, but they mostly represent real performance problems that developers have encountered.
Balanced
This test is balanced between different areas of the language and different types of code. It's not all math, all string processing, or all timing simple loops. In addition to having tests in many categories, the individual tests were balanced to take similar amounts of time on currently shipping versions of popular browsers.
Statistically Sound
One of the challenges of benchmarking is knowing how much noise you have in your measurements. This benchmark runs each test multiple times and determines an error range (technically, a 95% confidence interval). In addition, in comparison mode it tells you if you have enough data to determine if the difference is statistically significant.

Local ENV:
Linux 2.6.22
FireFox 2.0.0.12
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total: 38319.4ms +/- 0.6%
--------------------------------------------

3d: 6338.6ms +/- 2.3%
cube: 1642.2ms +/- 5.2%
morph: 3811.8ms +/- 2.3%
raytrace: 884.6ms +/- 5.9%

access: 3605.0ms +/- 0.9%
binary-trees: 338.0ms +/- 4.2%
fannkuch: 798.4ms +/- 3.8%
nbody: 1797.4ms +/- 1.2%
nsieve: 671.2ms +/- 1.9%

bitops: 9712.0ms +/- 1.9%
3bit-bits-in-byte: 671.4ms +/- 10.0%
bits-in-byte: 594.8ms +/- 1.8%
bitwise-and: 7660.6ms +/- 2.2%
nsieve-bits: 785.2ms +/- 0.9%

controlflow: 243.8ms +/- 1.7%
recursive: 243.8ms +/- 1.7%

crypto: 1528.2ms +/- 3.5%
aes: 463.2ms +/- 2.3%
md5: 512.4ms +/- 11.1%
sha1: 552.6ms +/- 1.9%

date: 5408.6ms +/- 1.9%
format-tofte: 1897.4ms +/- 5.6%
format-xparb: 3511.2ms +/- 1.3%

math: 3501.0ms +/- 3.1%
cordic: 1544.0ms +/- 5.3%
partial-sums: 1212.2ms +/- 1.5%
spectral-norm: 744.8ms +/- 7.3%

regexp: 1212.4ms +/- 4.0%
dna: 1212.4ms +/- 4.0%

string: 6769.8ms +/- 0.6%
base64: 1609.6ms +/- 2.5%
fasta: 1169.6ms +/- 2.2%
tagcloud: 1047.8ms +/- 3.5%
unpack-code: 2265.4ms +/- 1.3%
validate-input: 677.4ms +/- 4.6%

FireFox 3-beta4-preview,对于它的性能, 评论很高,出现了“巨大,可怕”等字样,超过了 Opera9.5, 比IE7快10倍! 正式版临近了,期待。

~ FF英文字体换行一直是个问题,期望FF3有Fixed,而不是强行用JavaScript换行,很痛苦!

comments loading