blob: a178be70d3762208e3a5337cf21d43dac9dc3721 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<title>Esprima: Speed Comparisons</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="../assets/style.css">
<link rel="stylesheet" href="../assets/foundation/foundation.min.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>
<!-- Navigation bar -->
<div class="row">
<div class="twelve columns">
<nav class="top-bar">
<ul>
<li class="name">
<h1><a href="../index.html">Esprima</a></h1>
</li>
</ul>
<section>
<ul class="right">
<li class="divider show-for-medium-and-up"></li>
<li class="has-dropdown">
<a href="../demo/index.html">Demo</a>
<ul class="dropdown">
<li><label>Static Analysis</label></li>
<li><a href="../demo/parse.html">Online Parsing</a></li>
<li><a href="../demo/validate.html">Syntax Validator</a></li>
<li><a href="../demo/precedence.html">Operator Precedence</a></li>
<li><a href="../demo/collector.html">Regex Collector</a></li>
<li><label>Dynamic Tracing</label></li>
<li><a href="../demo/functiontrace.html">Function Instrumentation</a></li>
<li><label>Code Transformation</label></li>
<li><a href="../demo/rewrite.html">Source Rewrite</a></li>
<li><a href="../demo/minify.html">Minifiy &amp; Obfuscate</a></li>
<li><label>Editing Tools</label></li>
<li><a href="../demo/highlight.html">Identifier Highlight</a></li>
<li><a href="../demo/rename.html">Rename Refactoring</a></li>
<li><a href="../demo/autocomplete.html">Autocomplete</a></li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">Project</a>
<ul class="dropdown">
<li><a href="http://github.com/ariya/esprima">Git Repository</a></li>
<li><a href="https://travis-ci.org/ariya/esprima">Continuous Integration</a></li>
<li><a href="http://groups.google.com/group/esprima">Mailing List</a></li>
<li><a href="http://issues.esprima.org/">Issue Tracker</a></li>
<li class="divider"></li>
<li><label>QA</label></li>
<li><a href="../test/index.html">Unit Tests</a></li>
<li><a href="../test/benchmarks.html">Benchmarks Suite</a></li>
<li><a href="../test/compat.html">Compatibility Tests</a></li>
<li><a href="../test/compare.html">Speed Comparison</a></li>
<li><a href="../test/module.html">Module Loading</a></li>
<li><a href="../test/coverage.html">Coverage Analysis</a></li>
</ul>
</li>
<li><a href="../doc/index.html">Documentation</a></li>
</ul>
</section>
</nav>
</div>
</div>
<!-- Title and subtitle -->
<div class="row">
<div class="twelve columns">
<h3 class="subheader"><strong>Speed Comparison</strong> keeps everything in perspective</h3>
</div>
</div>
<!-- Main content -->
<div class="row">
<div class="eight columns">
<p>
<input id="run" class="medium radius button" type="submit" value="Run speed comparison" disabled /></p>
</p>
<p id="status">Please wait...</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 obviously varying). These tests exist only to ensure that Esprima parser is not ridiculously slow compare to other parsers.</p>
</div>
<div class="four columns">
<div class="panel">
<p>More info on the parsers:<br/>
<a href="https://github.com/google/traceur-compiler">github.com/google/traceur-compiler</a><br/>
<a href="https://github.com/mishoo/UglifyJS2">github.com/mishoo/UglifyJS2</a><br/>
<a href="https://github.com/marijnh/acorn">github.com/marijnh/acorn</a><br/>
</p>
<p>Each parser produces the syntax tree with location marking in every syntax node.</p>
</div>
<p><strong>Note</strong>: Esprima is not completely optimized for location tracking parsing yet. It still receives on-going, continuous performance tweaks.</p>
<p>Time measurement is carried out using <a href="http://benchmarkjs.com" target="_blank">Benchmark.js</a><span id="benchmarkjs-version"></span>.</p>
</div>
</div>
<!-- Footer -->
<div class="row copyright">
<div class="six columns">
<p>Esprima is created and mantained by <a href="http://ariya.ofilabs.com/about">Ariya Hidayat</a>.</p>
</div>
<div class="six columns">
<ul class="link-list right">
<li><a href="http://twitter.com/esprima">@Esprima</a></li>
<li><a href="https://github.com/ariya/esprima">GitHub</a></li>
</ul>
</div>
</div>
<script src="http://traceur-compiler.googlecode.com/git/bin/traceur.js"></script>
<script src="http://marijnhaverbeke.nl/acorn/acorn.js"></script>
<script src="http://lisperator.net/s/js/uglifyjs/uglify.js"></script>
</body>
</html>