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
<div id="box"></div>
<script>
var boxAnchor = document.createElement('div');
boxAnchor.style.cssText="white-space:nowrap";
boxAnchor.id = 'box';
for(var i=0;i<1000;i++)
{
var b = document.createElement('B');
boxAnchor.appendChild(b.insertBefore(document.createTextNode('asdf fewf'), b.firstChild).parentNode);
}
var box=document.getElementById('box');
function refreshRange()
{
box.parentNode.replaceChild(boxAnchor.cloneNode(true),box);
box=document.getElementById('box');
}
var range = document.createRange();
refreshRange();
</script>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script>
var jq111 = jQuery.noConflict(true);
</script>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script>
var jq213 = jQuery.noConflict(true);
</script>Ready to run.
| Test | Ops/sec | |
|---|---|---|
| removeChild Recheck | | ready |
| removeChild lastChild with reference | | ready |
| firstChild haschildnodes() check | | ready |
| deletecontents (IE9+) | | ready |
| replaceChild cloneNode(shallow) (DESTRUCTIVE) | | ready |
| removeChild then reAttach | | ready |
| innerhtml = "" | | ready |
| jquery 111 | | ready |
| hide | | ready |
| jquery 213 | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.