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
test performance for selectors with id
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
var html = "<p><div id="40">";
for ( var i = 0; i < 500; i++ ) {
html += '<a id="'+i+'"><span>'+i+'</span></a>';
}
html += "</div></p>";
document.write( html );
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
select over attribut |
| ready |
select over tag+hash |
| ready |
select over hash |
| ready |
by hash + parent |
| ready |
by hash + find |
| ready |
by hash + children |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.