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
The Sizzle engine acts much like the selector that the browser uses internally.
It parses from right to left.
For best performance this means that a selector will benefit when it's more specific is on the right side, or less specific on the left side.
And likewise it will be slower when it's less specific on the right side or more specific on the lef side.
<div class="random">random</div>
<div id="wrapper">
<div><label>Hi</label></div>
<span id="labeler">Hi</span>
<span id="inputer">Hi</span>
</form>
</div>
<div>random</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Left to Right |
| ready |
Right to Left |
| ready |
Tight |
| ready |
Loose |
| ready |
Right to Left id only |
| ready |
id |
| ready |
class |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.