Solve the SunSpider mystery: post your results.
====================================
SunSpider is probably the most used (JavaScript) CPU benchmark.
It is however considered an anomaly with very good results using
Internet Explorer for x86 hardware but much slower on other Browsers
What's behind the mystery?
--------------------------
All modern browsers compile JavaScript with a Just-In-Time compiler
before executing it in native code. SunSpider has a single source
file which contains all 26 sub-benchmarks one after the other.
We find that the actual native code execution time of the sub-
benches is extremely short. Often less than 1 ms, less than the time
resolution. This shows up as zeros in the result URL.
So what did we do?
------------------
We placed a simple for-loop around each sub-benchmark to increase
the execution time by a factor 100 like this:
for ( var x100 = 0; x100 < 100; ++x100 ) {
.........
}
The result of the 100x results versus the 1x results is surprising:
Internet Explorer now trails the list instead of being the fastest!
Opera 27 is the fastest with a normalized result of 83.47 ms versus
97.79 ms for Internet Explorer 11. The third column shows how much
of the 1x SunSpider result time the processor is not executing code
but doing other JIT related things (hot-spot optimization?)
It is clear that JIT compiler of Internet Explorer 11 does about
nothing any more after the initial compilation while the others
are still busy doing things in the few milliseconds that the sub-
benchmark tests run.
The original SunSpider benchmark is here:
https://www.webkit.org/perf/sunspider-1.0.2/sunspider-1.0.2/driver.html
The 100x SunSpider benchmark is here:
http://www.chip-architect.com/SunSpider-x100-1.0.2/SunSpider-x100-1.0.2/driver.html
Slow load times at the moment, sorry, (doesn't affect the results)
The whole 100x benchmark can be downloaded in a zip file:
http://www.chip-architect.com/SunSpider-x100-1.0.2/SunSpider-x100-1.0.2.zip
Unzip somewhere and open the file "driver.html" in your browser.
The modified JavaScript source file is "sunspider-test-contents.js"
====================================
SunSpider is probably the most used (JavaScript) CPU benchmark.
It is however considered an anomaly with very good results using
Internet Explorer for x86 hardware but much slower on other Browsers
What's behind the mystery?
--------------------------
All modern browsers compile JavaScript with a Just-In-Time compiler
before executing it in native code. SunSpider has a single source
file which contains all 26 sub-benchmarks one after the other.
We find that the actual native code execution time of the sub-
benches is extremely short. Often less than 1 ms, less than the time
resolution. This shows up as zeros in the result URL.
So what did we do?
------------------
We placed a simple for-loop around each sub-benchmark to increase
the execution time by a factor 100 like this:
for ( var x100 = 0; x100 < 100; ++x100 ) {
.........
}
The result of the 100x results versus the 1x results is surprising:
Code:
==================================================================
--------------- RESULTS - LOWER IS BETTER ------------------------
----------- Core i7 3630QM, 2.4GHz, 3.4GH turbo ------------------
==================================================================
time 100x -- time 1x -- JIT adder -- Browser
==================================================================
8347 ms --- 200 ms --- ( 117 ms) -- Opera 27
8516 ms --- 194 ms --- ( 109 ms) -- Chrome 40
8918 ms --- 181 ms --- ( 092 ms) -- Firefox 35
9779 ms --- 101 ms --- ( 003 ms) -- Internet Explorer 11
==================================================================
Opera 27 is the fastest with a normalized result of 83.47 ms versus
97.79 ms for Internet Explorer 11. The third column shows how much
of the 1x SunSpider result time the processor is not executing code
but doing other JIT related things (hot-spot optimization?)
It is clear that JIT compiler of Internet Explorer 11 does about
nothing any more after the initial compilation while the others
are still busy doing things in the few milliseconds that the sub-
benchmark tests run.
The original SunSpider benchmark is here:
https://www.webkit.org/perf/sunspider-1.0.2/sunspider-1.0.2/driver.html
The 100x SunSpider benchmark is here:
http://www.chip-architect.com/SunSpider-x100-1.0.2/SunSpider-x100-1.0.2/driver.html
Slow load times at the moment, sorry, (doesn't affect the results)
The whole 100x benchmark can be downloaded in a zip file:
http://www.chip-architect.com/SunSpider-x100-1.0.2/SunSpider-x100-1.0.2.zip
Unzip somewhere and open the file "driver.html" in your browser.
The modified JavaScript source file is "sunspider-test-contents.js"
Last edited:
