run.html 5.06 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<html>
<head>
<title>V8 Benchmark Suite</title>
<script type="text/javascript" src="base.js"></script>
<script type="text/javascript" src="richards.js"></script>
<script type="text/javascript" src="deltablue.js"></script>
<script type="text/javascript" src="crypto.js"></script>
<script type="text/javascript" src="raytrace.js"></script>
<script type="text/javascript" src="earley-boyer.js"></script>
<style>
body {
  font-family: sans-serif;
}

hr{
  border:1px solid;
  border-color:#36C;
  margin:1em 0
}

21 22 23 24
h1,h2,h3,h4{margin:0; margin-bottom:0}
h1{font-size: 200%; height: 2em}
h2{font-size: 140%; height: 2em}
h3{font-size: 100%; height: 2em}
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65

li{
  margin:.3em 0 1em 0;
}

body{
  font-family: Helvetica,Arial,sans-serif;
  font-size: small;
  color: #000;
  background-color: #fff;
}

div.title {
  background-color: rgb(229, 236, 249);
  border-top: 1px solid rgb(51, 102, 204);
  text-align: center;
  padding-top: 0.2em;
  padding-bottom: 0.2em;
  margin-bottom: 20px;
}

td.contents {
  text-align: start;
}

div.run {
  margin: 20px;
  width: 300px;
  height: 300px;
  float: right;
  background-color: rgb(229, 236, 249);
  background-image: url(v8-logo.png);
  background-position: center center;
  background-repeat: no-repeat;
  border: 1px solid rgb(51, 102, 204);
}
</style>

<script type="text/javascript">
var completed = 0;
var benchmarks = BenchmarkSuite.CountBenchmarks();
66 67
var success = true;

68 69 70 71 72 73 74 75 76 77 78 79 80 81
function ShowProgress(name) {
  var status = document.getElementById("status");
  var percentage = ((++completed) / benchmarks) * 100;
  status.innerHTML = "Running: " + Math.round(percentage) + "% completed.";
}


function AddResult(name, result) {
  var text = name + ': ' + result;
  var results = document.getElementById("results");
  results.innerHTML += (text + "<br/>");  
}


82 83 84 85 86 87
function AddError(name, error) {
  AddResult(name, '<b>error</b>');
  success = false;
}


88 89
function AddScore(score) {
  var status = document.getElementById("status");
90 91 92
  if (success) {
    status.innerHTML = "Score: " + score;
  }
93 94 95 96 97
}


function Run() {
  BenchmarkSuite.RunSuites({ NotifyStep: ShowProgress,
98
                             NotifyError: AddError,
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
                             NotifyResult: AddResult,
                             NotifyScore: AddScore }); 
}

function Load() {
  var version = BenchmarkSuite.version;
  document.getElementById("version").innerHTML = version;
  window.setTimeout(Run, 200);
}
</script>
</head>
<body onLoad="Load()">
<div>
  <div class="title"><h1>V8 Benchmark Suite - version <span id="version">?</span></h1></div>
  <table>
    <tr>
      <td class="contents">
This page contains a suite of pure JavaScript benchmarks that we have
used to tune V8. The final score is computed as the geometric mean of
the individual results to make it independent of the running times of
the individual benchmarks and of a reference system (score
100). Scores are not comparable across benchmark suite versions and
higher scores means better performance: <em>Bigger is better!</em>

<ul>
<li><b>Richards</b><br/>OS kernel simulation benchmark, originally written in BCPL by Martin Richards (<i>539 lines</i>).</li>
<li><b>DeltaBlue</b><br/>One-way constraint solver, originally written in Smalltalk by John Maloney and Mario Wolczko (<i>880 lines</i>).</li>
<li><b>Crypto</b><br/>Encryption and decryption benchmark based on code by Tom Wu (<i>1689 lines</i>).</li>
<li><b>RayTrace</b><br/>Ray tracer benchmark based on code by <a href="http://flog.co.nz/">Adam Burmister</a> (<i>3418 lines</i>).</li>
<li><b>EarleyBoyer</b><br/>Classic Scheme benchmarks, translated to JavaScript by Florian Loitsch's Scheme2Js compiler (<i>4682 lines</i>).</li>
</ul>

131 132 133 134 135 136 137 138 139 140 141 142 143
<div class="title"><h2>Revisions of the benchmark suite</h2></div>

<p><i>Please note that benchmark results are not comparable unless both
results are run with the same revision of the benchmark suite.  We will be
making revisions from time to time in order to fix bugs or expand the scope
of the benchmark suite.</i></p>

<div class="title"><h3>Version 1</h3></div>

<p>Initial release.</p>

<div class="title"><h3>Version 2</h3></div>

144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
<p>For version 2 the crypto benchmark was fixed.  Previously, the
decryption stage was given plaintext as input, which resulted in an
error.  Now, the decryption stage is given the output of the
encryption stage as input.  The result is checked against the original
plaintext.  For this to give the correct results the crypto objects
are reset for each iteration of the benchmark.  In addition, the size
of the plain text has been increased a little and the use of
Math.random() and new Date() to build an RNG pool has been
removed. </p>

<p>Other benchmarks were fixed to do elementary verification of the
results of their calculations.  This is to avoid accidentally
obtaining scores that are the result of an incorrect JavaScript engine
optimization.</p>

159

160 161 162 163 164 165 166 167 168 169 170 171
</td><td style="text-align: center">
<div class="run">
  <div id="status" style="text-align: center; margin-top: 75px; font-size: 120%; font-weight: bold;">Starting...</div>
  <div style="text-align: left; margin: 30px 0 0 90px;" id="results">
  <div>
</div>
</td></tr></table>

</div>

</body>
</html>