summaryrefslogtreecommitdiffstats
path: root/SunSpider/hosted
diff options
context:
space:
mode:
Diffstat (limited to 'SunSpider/hosted')
-rw-r--r--SunSpider/hosted/sunspider-driver.html96
-rw-r--r--SunSpider/hosted/sunspider-record-result.js31
-rw-r--r--SunSpider/hosted/sunspider-results.html91
-rw-r--r--SunSpider/hosted/sunspider.css31
-rw-r--r--SunSpider/hosted/sunspider.html78
5 files changed, 327 insertions, 0 deletions
diff --git a/SunSpider/hosted/sunspider-driver.html b/SunSpider/hosted/sunspider-driver.html
new file mode 100644
index 0000000..16fbca9
--- /dev/null
+++ b/SunSpider/hosted/sunspider-driver.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!--
+ Copyright (C) 2007 Apple Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<title>SunSpider JavaScript Benchmark (In Progress...)</title>
+<link rel="stylesheet" href="sunspider.css"></link>
+</head>
+
+<body onload="next()">
+
+<h2><span id="logo">&#x2600;</span>SunSpider JavaScript Benchmark <small>(In Progress...)</small></h2>
+
+<script src="sunspider-test-prefix.js"></script>
+<script>
+var testIndex = -1;
+var currentRepeat = 0;
+var repeatCount = 5;
+
+var output = [];
+output.length = repeatCount;
+for (var i = 0; i < output.length; i++) {
+ output[i] = {};
+}
+
+function next()
+{
+ window.setTimeout(reallyNext, 500);
+}
+
+function reallyNext()
+{
+ testIndex++;
+ if (testIndex < tests.length) {
+ document.getElementById("testframe").src = tests[testIndex] + ".html";
+ } else if (++currentRepeat < repeatCount) {
+ testIndex = 0;
+ document.getElementById("testframe").src = tests[testIndex] + ".html";
+ } else {
+ finish();
+ }
+}
+
+function recordResult(time)
+{
+ output[currentRepeat][tests[testIndex]] = time;
+ next();
+}
+
+function finish()
+{
+ var outputString = "{";
+ for (var test in output[0]) {
+ outputString += '"' + test + '":[';
+ for (var i = 0; i < output.length; i++) {
+ outputString += output[i][test] + ",";
+ }
+ outputString = outputString.substring(0, outputString.length - 1);
+ outputString += "],";
+ }
+ outputString = outputString.substring(0, outputString.length - 1);
+ outputString += "}";
+
+ location = "sunspider-results.html?" + encodeURI(outputString);
+}
+
+</script>
+
+<iframe id="testframe">
+</iframe>
+
+</body>
+</html>
diff --git a/SunSpider/hosted/sunspider-record-result.js b/SunSpider/hosted/sunspider-record-result.js
new file mode 100644
index 0000000..f86749a
--- /dev/null
+++ b/SunSpider/hosted/sunspider-record-result.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function record(time) {
+ document.getElementById("console").innerHTML = time + "ms";
+ if (window.parent) {
+ parent.recordResult(time);
+ }
+}
diff --git a/SunSpider/hosted/sunspider-results.html b/SunSpider/hosted/sunspider-results.html
new file mode 100644
index 0000000..cc74938
--- /dev/null
+++ b/SunSpider/hosted/sunspider-results.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!--
+ Copyright (C) 2007 Apple Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<title>SunSpider JavaScript Benchmark Results</title>
+<link rel="stylesheet" href="sunspider.css"></link>
+</head>
+
+<body>
+<h2><span id="logo">&#x2600;</span>SunSpider JavaScript Benchmark Results</h2>
+
+<p><a href="sunspider-driver.html">Run Again</a></p>
+
+<p><input style="width: 90%;" id="selfUrl" type="text" readonly="readonly"></input><br>
+<small>(You can bookmark this results URL for later comparison.)</small></p>
+
+<form onsubmit="event.preventDefault(); compare(other.value);">To compare to another run, paste a saved result URL in the text field below and press enter:<br>
+<input style="width: 90%;" name="other" type="text"></input><br>
+</form>
+
+<pre id="console">
+</pre>
+
+
+<script>
+var selfUrlInput = document.getElementById("selfUrl");
+selfUrlInput.value = location;
+
+var output = pivot(eval("(" + decodeURI(location.search.substring(1)) + ")"));
+
+function pivot(input) {
+ var output = [];
+ for (var test in input) {
+ for (var i = 0; i < input[test].length; i++) {
+ if (!output[i])
+ output[i] = {};
+ output[i][test] = input[test][i];
+ }
+ }
+ return output;
+}
+
+function print(str) {
+ var console = document.getElementById("console");
+ console.appendChild(document.createTextNode(str));
+ console.appendChild(document.createElement("br"));
+}
+</script>
+
+<script src="sunspider-test-prefix.js"></script>
+<script src="sunspider-analyze-results.js"></script>
+<script src="sunspider-compare-results.js"></script>
+
+<script>
+var output2 = output;
+
+function compare(other)
+{
+ document.getElementById("console").innerHTML = "";
+ var output1 = pivot(eval("(" + decodeURI(other.split("?")[1]) + ")"));
+ sunspiderCompareResults(output1, output2);
+}
+</script>
+
+
+</body>
+</html>
diff --git a/SunSpider/hosted/sunspider.css b/SunSpider/hosted/sunspider.css
new file mode 100644
index 0000000..7a17979
--- /dev/null
+++ b/SunSpider/hosted/sunspider.css
@@ -0,0 +1,31 @@
+
+body { font-family: sans-serif;
+ margin: 20px;
+ background-color: #D9D5A1;
+ color: #1B0636 }
+
+h2 { background-color: #4E8AB9;
+ margin: -20px -20px 0px -20px;
+ padding: 30px 20px 30px 20px;
+ color: yellow;
+ border-bottom: 2px solid #360D6B;
+ zoom: 1.0 /* I CAN HAS LAYOUT? (ie hack) */ }
+
+dt { font-weight: bold }
+
+dd { margin-bottom: 1em; margin-top: 0.5em }
+
+:link { color: #1363A1 }
+:visited { color: #5113A1 }
+
+#testframe { margin-top: 20px;
+ width: 80%;
+ height: 500px;
+ border: 2px solid #360D6B }
+
+#logo { float: left;
+ position: relative;
+ bottom: 0.33em;
+ padding-right: 20px;
+ margin-bottom: -40px;
+ font-size: 3em }
diff --git a/SunSpider/hosted/sunspider.html b/SunSpider/hosted/sunspider.html
new file mode 100644
index 0000000..f7dfd42
--- /dev/null
+++ b/SunSpider/hosted/sunspider.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+<!--
+ Copyright (C) 2007 Apple Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<title>SunSpider JavaScript Benchmark</title>
+<link rel="stylesheet" href="sunspider.css"></link>
+</head>
+
+<body>
+
+<h2><span id="logo">&#x2600;</span>SunSpider JavaScript Benchmark</h2>
+
+<p>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:</p>
+
+<dl>
+<dt>Real World<dt>
+<dd>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.</dd>
+
+<dt>Balanced<dt>
+<dd>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.</dd>
+
+<dt>Statistically Sound<dt>
+<dd>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.</dd>
+
+</dl>
+
+<p><a href="sunspider-driver.html">Start Now!</a><br>
+<small>(When you run the benchmark, be patient - it loops through all of the
+test cases five times and can take a minute or longer to complete.)</small></p>
+
+</body>
+
+</html>