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
Determining whether it is faster to use click(), bind(), delegate(), or live() on click events.
This version actually runs the event handlers, rather than simply binding them.
<div id="extra-dom-content">
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
<a href="#">Home</a>
</div>
<a href="#">Home</a>
<ul id="nav">
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
<li>
<a href="#" class="delegate">DelegateLink</a>
</li>
<li>
<a href="#" class="normal">NonDelegateLink</a>
</li>
</ul>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
/script
function fireEvent(element, event) {
if (document.createEvent) {
// dispatch for firefox + others
var evt = document.createEvent("HTMLEvents");
evt.initEvent(event, true, true); // event type,bubbling,cancelable
return !element.dispatchEvent(evt);
} else {
// dispatch for IE
var evt = document.createEventObject();
return element.fireEvent('on' + event, evt)
}
}
$(document).on('click', '#nav a.delegate', function(e) {
e.preventDefault();
});
$('#nav a.normal').click(function(e) {
e.preventDefault();
});
var delegateLink = $('#nav a.delegate')[0];
var normalLink = $('#nav a.normal')[0];
Ready to run.
Test | Ops/sec | |
---|---|---|
Delegated |
| ready |
Non-Delegated |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.