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
Changes to rev 26 (rev 27 is worse):
- repositioning xpath
- remove foo + checks for it (search for selecting elem by id once is enough)
- remove getElementById("poo") in querySelector (Class) & jQuery Class Selector for a true comparison of the algorithms.
- jQuery Class Selector -> jQuery w. querySelector
- added real jQuery ClassSelector
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<p id="bar" class="my-baz">
Bar
</p>
<span id="baz" class="my-baz">
Baz
</span>
Ready to run.
Test | Ops/sec | |
---|---|---|
getElementById |
| ready |
querySelector (ID) |
| ready |
jQuery ID Selector |
| ready |
xpath eval |
| ready |
getElementsByClassName |
| ready |
querySelector (Class) |
| ready |
jQuery ClassSelector |
| ready |
jQuery w. querySelector |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.