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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div class="wp-volt-gal-nav-items">
<div class="wp-volt-gal-nav-button selected" data-index="1">1</div>
<div class="wp-volt-gal-nav-button" data-index="2">2</div>
<div class="wp-volt-gal-nav-button" data-index="3">3</div>
<div class="wp-volt-gal-nav-button wp-volt-gal-nav-item-section" data-index="4t"></div>
<div class="wp-volt-gal-nav-button" data-index="4">4</div>
<div class="wp-volt-gal-nav-button" data-index="5">5</div>
<div class="wp-volt-gal-nav-button" data-index="6">6</div>
<div class="wp-volt-gal-nav-button" data-index="7">7</div>
<div class="wp-volt-gal-nav-button" data-index="8">8</div>
<div class="wp-volt-gal-nav-button" data-index="9">9</div>
<div class="wp-volt-gal-nav-button" data-index="10">10</div>
</div>
var itemsEl = $('.wp-volt-gal-nav-items');
var itemEls = itemsEl.children();
itemEls.removeClass('selected');
var state = {
currentPhoto: '4t',
sectionIndex: 1
};
function isPhoto() {
return this.attr('data-index') == state.currentPhoto;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Finding using .eq() |
| ready |
Filter using selector |
| ready |
Filter using function |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.