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++)
{
boxAnchor.appendChild(document.createElement('B').insertBefore(document.createTextNode('asdf fewf')).parentNode);
}
var box=document.getElementById('box');
function refreshRange()
{
box.parentNode.replaceChild(boxAnchor.cloneNode(true),box);
box=document.getElementById('box');
}
function sleep(mseconds)
{
var e = new Date().getTime() + (mseconds);
while (new Date().getTime() <= e) {}
}
var range = document.createRange();
refreshRange();
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
Ready to run.
Test | Ops/sec | |
---|---|---|
jquery |
| ready |
hide |
| ready |
assert |
| ready |
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 |
You can edit these tests or add more tests to this page by appending /edit to the URL.