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
Ref. http://jsperf.com/jquery-15-unique-traversal
<script src="//code.jquery.com/jquery-1.4.4.min.js">
</script>
<script>
var $14 = jQuery.noConflict();
</script>
<script src="//code.jquery.com/jquery-1.8.2.min.js">
</script>
<script>
var $18 = jQuery.noConflict();
</script>
<input id="val" type="text" value="foo">
<div id="children" style="display:none;"></div>
<script>
var i, j, html = "";
for (j = 0; j < 20; j++) {
html += "<div class='children'>";
for (i = 0; i < 5; i++) {
html += "<div>abc</div><div>012</div>";
}
html += "</div>";
}
document.getElementById("children").innerHTML = html;
</script>
<div id="id-outer">
<div id="id-inner">
</div>
</div>
var $14val = $14('#val');
var $18val = $18('#val');
var $14children = $14(".children");
var $18children = $18(".children");
var $14outer = $14('#id-outer');
var $18outer = $18('#id-outer');
Ready to run.
Test | Ops/sec | |
---|---|---|
1.4 .val() |
| ready |
1.8 .val() |
| ready |
1.4 .children() |
| ready |
1.8 .children() |
| ready |
1.4 .find("#child") |
| ready |
1.8 .find("#child") |
| ready |
1.4 $("#id") |
| ready |
1.8 $("#id") |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.