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
<script src="http://underscorejs.org/underscore-min.js"></script>
<script src="http://olado.github.io/doT/doT.min.js"></script>
<script src="http://rawgithub.com/smcmurray/kata/master/kata.min.js"></script>
<script>
window.sharedVariables = {
header: "Some text",
header2: "More text",
header3: "Allows \"double quotes\"",
header4: "& isn't &",
header5: "<escaped ok='true'>",
header6: "Bold text",
list: ['1 <ok>', '2 <ok>', '3 <ok>', '4 <ok>', '5 <ok>', '6 <ok>', '7 <ok>', '8 <ok>', '9 <ok>', '10 <ok>']
};
window.templateDiv = document.getElementById("template");
window.doTTemplate = doT.template("<div><h1 class='header'>{{=it.header}}</h1><h2 class='header2'>{{=it.header2}}</h2><h3 class='header3'>{{=it.header3}}</h3><h4 class='header4'>{{=it.header4}}</h4><h5 class='header5'>{{=it.header5}}</h5><h6 class='header6'>{{=it.header6}}</h6><ul class='list'>{{~it.list:l}}<li class='item'>{{=l}}</li>{{~}}</ul></div>");
window.underscoreTemplate = _.template("<div><h1 class='header'><%=header%></h1><h2 class='header2'><%=header2%></h2><h3 class='header3'><%=header3%></h3><h4 class='header4'><%=header4%></h4><h5 class='header5'><%=header5%></h5><h6 class='header6'><%=header6%></h6><ul class='list'><% _.each(list, function(name) { %><li class='item'><%= name %></li><% }); %></ul></div>");
window.kataTemplate = kata("{{%(t)<div><h1 class='header'>{{t.header}}</h1><h2 class='header2'>{{t.header2}}</h2><h3 class='header3'>{{t.header3}}</h3><h4 class='header4'>{{t.header4}}</h4><h5 class='header5'>{{t.header5}}</h5><h6 class='header6'>{{t.header6}}</h6><ul class='list'>{{@(t.list)(l)<li class='item'>{{l}}</li>@}}</ul></div>%}}");
</script>
<div id="template" style="display:none"></div>
Ready to run.
Test | Ops/sec | |
---|---|---|
Underscore |
| ready |
doT |
| ready |
Kata |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.