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
checking how best to insert shy of a template
<script src="//code.jquery.com/jquery-git2.min.js"></script>
<script src="//fastjs.net/js/fast.min.js"></script>
<script src="//zeptojs.com/zepto.min.js"></script>
<script src="//rawgithub.com/dameleon/tt.js/master/tt.min.js"></script>
<script src="//rawgithub.com/01org/appframework/master/appframework.min.js"></script>
<div id="test-wrapper"><span id="text">text</span></div>
var one = 'String Item 1';
var two = 'String Item 2';
var three = 'String Item 3';
var four = 'String Item 4';
var five = 'String Item 5';
var string = '<div class="entry" id="' + one + '">' +
'<a class="bookmark" href="' + two + '" title="' + three + '" >' +
'<div class="imgwrapper"><div class="image" style="background-image:url(' + four + ')" /></div>' +
'<table class="details">' +
'<tr>' +
'<td class="edit" title="Edit"><span class="foundicon-edit"></span></td>' +
'<td class="title"><div>' + five + '</div></td>' +
'<td class="remove" title="Remove"><div class="foundicon-remove"></div></td>' +
'</tr>' +
'</table>' +
'</div>' +
'</a>' +
'</div>';
if (document.getElementById("test-wrapper").children.length >= 50) {
$("#test-wrapper")[0].innerHTML = '';
$("#test-wrapper")[0].innerText = null;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery append string |
| ready |
innerHTML string |
| ready |
insertAdjacentHTML string |
| ready |
jQuery parsed string |
| ready |
Hybrid parsed string |
| ready |
jQ + insertAdj |
| ready |
tt.js |
| ready |
FastJs |
| ready |
AppFW |
| ready |
Zepto |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.