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
More complicated mustache
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/hogan.js/2.0.0/hogan.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min.js"></script>
var template = "<strong>This is a slightly more complicated {{thing}}.</strong>.\n{{! Just ignore this business. }}\nCheck this out:\n{{#hasThings}}\n<ul>\n{{#things}}\n<li class={{className}}>{{word}}</li>\n{{/things}}</ul>.\n{{/hasThings}}\n{{^hasThings}}\n\n<small>Nothing to check out...</small>\n{{/hasThings}}";
var context = {
thing: function() {
return "blah";
},
things: [
{"className": "one", word: "@fat"},
{"className": "two", word: "@dhg"},
{"className": "three", word:"@sayrer"}
],
hasThings: true
};
var handlebarsRenderer = Handlebars.compile(template);
var hoganRenderer = Hogan.compile(template);
var mustacheRenderer = Mustache.compile(template);
Ready to run.
Test | Ops/sec | |
---|---|---|
Handlebars |
| ready |
Hogan |
| ready |
Mustache |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.