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
(FOR MOBILE BROWSERS)Tests performance of jQuery event listeners.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="main">
<div>
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
</ul>
</div>
</div>
<div class="btncontainer">
<button id="btn" class="btns">click me</button>
<button id="btn" class="btns">click me</button>
<button id="btn" class="btns">click me</button>
<button id="btn" class="btns">click me</button>
<button id="btn" class="btns">click me</button>
</div>var btns = document.getElementsByClassName("btns");
var $btns= $(".btns");
var body = $("body");Ready to run.
| Test | Ops/sec | |
|---|---|---|
| click | | ready |
| bind | | ready |
| on | | ready |
| onclick | | ready |
| on - cached selctor | | ready |
| click - cached selector | | ready |
| bind - cached selector | | ready |
| delegate | | ready |
| addEventListener | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.