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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script>
var content = '';
for (var i = 0; i < 500; i++) {
content += '<div id="lkjsf' + i + '"></div>';
}
$('body').append('<div id="test" style="display:none">' + content + '</div>');
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
first |
| ready |
direct first |
| ready |
direct first-child |
| ready |
direct nth-child |
| ready |
eq |
| ready |
find first |
| ready |
find direct first |
| ready |
find element first |
| ready |
find element eq |
| ready |
children first |
| ready |
children first in array as jquery object |
| ready |
children eq |
| ready |
children first-child |
| ready |
children nth-child |
| ready |
DOM firstChild |
| ready |
direct div first in array |
| ready |
DOM first child as jQuery object |
| ready |
DOM first child element |
| ready |
children first in array |
| ready |
children().first() |
| ready |
Native & jQ mix |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.