<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Esprima: Speed Comparison</title>
<link rel="stylesheet" type="text/css" href="../assets/style.css"/>
<script src="../esprima.js"></script>
<script src="../assets/json2.js"></script>
<script src="compare.js"></script>
<script src="3rdparty/benchmark.js"></script>
<script src="3rdparty/XMLHttpRequest.js"></script>
<script>
/*jslint browser:true, sloppy:true */
/*global setupBenchmarks:true*/
window.onload = function () {
    window.setTimeout(setupBenchmarks, 211);
};
</script>
</head>
<body>

<div class="container">

<div class="topbar">
<ul class="nav">
<li><a href="../index.html">&larr; Home</a></li>
<li><a href="http://github.com/ariya/esprima">Code</a></li>
<li><a href="../doc/index.html">Documentation</a></li>
<li><a href="http://issues.esprima.org">Issues</a></li>
</ul>
</div>

<h1>Compare <small>with other parsers</small></h1>

<p>Time measurement is carried out using <a href="http://benchmarkjs.com" target="_blank">Benchmark.js</a><span id="benchmarkjs-version"></span>.</p>

<p>Esprima version <span id="version"></span>.</p>

<p><span id="status">Please wait...</span>
<input id="run" type="submit" value="Run speed comparison" disabled /></p>

<p id="result"></p>


<p><strong>Warning:</strong> Since each parser may have a different format for the syntax tree, the speed is not fully comparable (the cost of constructing different result is not taken into account). These tests exist only to ensure that Esprima parser is not ridiculously slow compare to other parsers.</p>

<p><strong>parse-js</strong> is the parser used in <a href="https://github.com/mishoo/UglifyJS">UglifyJS v1</a>. It's a JavaScript port of the Common LISP version. This test uses <code>parse-js</code> from UglifyJS version 1.3.2 (June 26 2012).</p>

<p><strong><a href="https://github.com/marijnh/acorn">Acorn</a></strong> is a compact stand-alone JavaScript parser. This test uses Acorn revision 48bbcd94 (dated Oct 19 2012).</p>

<p>More comparison variants will be added in the near future.</p>

<div class="footer"><strong>Esprima</strong> is created by
<a href="http://ariya.ofilabs.com/about" target="_blank">Ariya Hidayat</a>. Follow <a href="http://twitter.com/ariyahidayat">@ariyahidayat</a> on Twitter.
</div>
</div>

<script src="3rdparty/acorn.js"></script>

<!-- parse-js, part of UglifyJS -->
<script>
/*global exports:true*/
exports = window.parseJS = {};
</script>
<script src="3rdparty/parse-js.js"></script>

</body>
</html>

