jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
Set handlebars compiler option to {data: false}.
<script id="template_one" type="text/x-handlebars-template">
<h3>{{header}}</h3>
<ul>
{{#items}}
{{#first}}<li><strong>{{name}}</strong></li>{{/first}}
{{/items}}
</ul>
{{#double}}
<p>Double rainbow!</p>
{{/double}}
</script>
<script src="//cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min.js"></script>
<script src="//builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.1.1.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/hogan.js/2.0.0/hogan.js">
</script>
<script>
var stringTemplate = document.getElementById('template_one').innerHTML;
var templateData = {
"header": "Colors",
"items": [{
"name": "rainbow",
"first": true,
"url": "#Rainbow"
}, {
"name": "red",
"link": true,
"url": "#Red"
}, {
"name": "orange",
"link": true,
"url": "#Orange"
}, {
"name": "yellow",
"link": true,
"url": "#Yellow"
}, {
"name": "green",
"link": true,
"url": "#Green"
}, {
"name": "blue",
"link": true,
"url": "#Blue"
}, {
"name": "purple",
"link": true,
"url": "#Purple"
}, {
"name": "white",
"link": false,
"url": "#While"
}, {
"name": "black",
"link": false,
"url": "#Black"
}],
"double": true
};
var handlebars_precompiledTemplate = Handlebars.compile(stringTemplate, {data: false});
var hogan_precompiledTemplate = Hogan.compile(stringTemplate);
</script>
<div id="output"></div>
document.getElementById('output').innerHTML = templateOutput;
Ready to run.
Test | Ops/sec | |
---|---|---|
Mustache |
| ready |
Handlebars |
| ready |
Handlebars: precompiled |
| ready |
Hogan |
| ready |
Hogan: precompiled |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.