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
Testing traversal speed of HTMLFormElement.elements vs. other methods.
Speeds of QSA (QSA + jQuery) results are misleading unless queries are dynamically switched between iterations as in many cases (Opera 11 especially), the queries get cached.
<form method="post" action="./" id="foo">
<input type="checkbox" name="bar" value="1" checked />
<input type="checkbox" name="bar" value="2" checked />
<input type="checkbox" name="bar" value="3" />
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script>
var foo = document.getElementById("foo"),
numChecked = 0;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
HTMLFormElement.elements |
| ready |
QuerySelectorAll |
| ready |
jQuery Attribute Query |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.