<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<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>
<script type="text/javascript" src="regexp.js"></script>
<script type="text/javascript" src="splay.js"></script>
<link type="text/css" rel="stylesheet" href="style.css" />
<script type="text/javascript">
var completed = 0;
var benchmarks = BenchmarkSuite.CountBenchmarks();
var success = true;

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>");
}


function AddError(name, error) {
  AddResult(name, '<b>error<\/b>');
  success = false;
}


function AddScore(score) {
  var status = document.getElementById("status");
  if (success) {
    status.innerHTML = "Score: " + score;
  }
}


function Run() {
  BenchmarkSuite.RunSuites({ NotifyStep: ShowProgress,
                             NotifyError: AddError,
                             NotifyResult: AddResult,
                             NotifyScore: AddScore }); 
}

function ShowWarningIfObsolete() {
  // If anything goes wrong we will just catch the exception and no 
  // warning is shown, i.e., no harm is done.
  try {
    var xmlhttp;
    var next_version = parseInt(BenchmarkSuite.version) + 1; 
    var next_version_url = "../v" + next_version + "/run.html";  
    if (window.XMLHttpRequest) {
      xmlhttp = new window.XMLHttpRequest();
    } else if (window.ActiveXObject) {
      xmlhttp = new window.ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.open('GET', next_version_url, true);
    xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
        document.getElementById('obsolete').style.display="block";
      }
    };
    xmlhttp.send(null);
  } catch(e) {
    // Ignore exception if check for next version fails. 
    // Hence no warning is displayed.
  }
}

function Load() {
  var version = BenchmarkSuite.version;
  document.getElementById("version").innerHTML = version;
  ShowWarningIfObsolete();  
  setTimeout(Run, 200);
}
</script>
</head>
<body onload="Load()">
<div>
  <div class="title"><h1>V8 Benchmark Suite - version <span id="version">?</span></h1></div>
  <div class="warning" id="obsolete"> 
Warning! This is not the latest version of the V8 benchmark
suite. Consider running the   
<a href="http://v8.googlecode.com/svn/data/benchmarks/current/run.html">
latest version</a>.  
  </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>1698 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>935 lines</i>).</li>
<li><b>EarleyBoyer</b><br>Classic Scheme benchmarks, translated to JavaScript by Florian Loitsch's Scheme2Js compiler (<i>4685 lines</i>).</li>
<li><b>RegExp</b><br>Regular expression benchmark generated by extracting regular expression operations from 50 of the most popular web pages
(<i>1614 lines</i>).
</li>
<li><b>Splay</b><br>Data manipulation benchmark that deals with splay trees and exercises the automatic memory management subsystem (<i>378 lines</i>).</li>
</ul>

<p>
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.  For previous revisions and the change log see
the <a href="http://v8.googlecode.com/svn/data/benchmarks/current/revisions.html">revisions</a> page.
</p>

</td><td style="text-align: center">
<div class="run">
  <div id="status">Starting...</div>
  <div id="results">
  </div>
</div>
</td></tr></table>

</div>

</body>
</html>
