Test name | Executions per second |
---|---|
1.8.3 | 14354.2 Ops/sec |
1.9.1 | 14392.9 Ops/sec |
1.12.14 | 15447.7 Ops/sec |
2.2.4 | 15500.5 Ops/sec |
3.2.1 | 16258.2 Ops/sec |
<div id="idSelector"></div>
<div class="classSelector"></div>
<ul id="iteration">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div id="cssGetter" style="color: black;"></div>
<div id="cssSetter" style="color: black;"></div>
<div id="find">
<span></span>
<div>
<strong></strong>
</div>
</div>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script>
var $jq18 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
var $jq19 = $.noConflict(true);
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">
</script>
<script>
var $jq112 = $.noConflict(true);
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js">
</script>
<script>
var $jq224 = $.noConflict(true);
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
</script>
<script>
var $jq321 = $.noConflict(true);
</script>
function tests($) {
// Filter Next
$('#iteration li').filter(':first').next();
// Filter Prev
$('#iteration li').filter(':last').prev();
// Non-existant Class
$('.someClass');
// Non-existant ID
$('#someID');
// Find
$('#find').find('strong');
// Set color
$('#cssSetter').css('color', 'red');
// Get color
$('#cssGetter').css('color');
// Iteration
$('#iteration li').each(function(i, e) {
i++;
});
// Class selector
$('.classSelector');
// ID selector
$('#idSelector');
}
tests($jq18);
tests($jq18);
tests($jq112);
tests($jq224);
tests($jq321);