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
<div>
<ul id="menu">
<li class="menu-item">
</li>
<li class="menu-item">
</li>
<li class="menu-item">
</li>
<li class="menu-item">
</li>
<li class="menu-item">
</li>
<li class="menu-item">
</li>
</ul>
</div>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script>
var $jq172 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
</script>
<script>
var $jq1111 = $.noConflict(true);
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.js">
</script>
<script>
var $jq211 = $.noConflict(true);
</script>
function test1($) {
$('#menu').css({
'backgroud': 'red'
});
$('.menu-item').eq(2).hasClass('foo');
}
function test2($) {
$('#menu').css({
'backgroud': 'red'
});
$('.menu-item').eq(2).hasClass('foo');
$('.menu-item').addClass('foo');
$('.menu-item').addClass('bar');
}
function test3($) {
$('#menu').css({
'backgroud': 'red'
});
$('.menu-item').eq(2).hasClass('foo');
$('.menu-item').addClass('foo');
$('.menu-item').addClass('bar');
$('.menu-item').removeClass('none');
$('.menu-item').eq(3).removeClass('bar');
}
Ready to run.
Test | Ops/sec | |
---|---|---|
01 jQuery 1.7.2 |
| ready |
02 jQuery 1.11.1 |
| ready |
03 jQuery 2.1.1 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.