Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0
Firefox 85
Windows
Desktop
3 years ago
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
HTML Preparation code:
x
 
1
<div id="idSelector"></div>
2
<div class="classSelector"></div>
3
<ul id="iteration">
4
    <li></li>
5
    <li></li>
6
    <li></li>
7
    <li></li>
8
    <li></li>
9
    <li></li>
10
    <li></li>
11
    <li></li>
12
    <li></li>
13
    <li></li>
14
</ul>
15
<div id="cssGetter" style="color: black;"></div>
16
<div id="cssSetter" style="color: black;"></div>
17
<div id="find">
18
    <span></span>
19
    <div>
20
        <strong></strong>
21
    </div>
22
</div>
23
24
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
25
</script>
26
<script>
27
  var $jq18 = $.noConflict(true);
28
</script>
29
30
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
31
</script>
32
<script>
33
  var $jq19 = $.noConflict(true);
34
</script>
35
36
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">
37
</script>
38
<script>
39
  var $jq112 = $.noConflict(true);
40
</script>
41
42
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js">
43
</script>
44
<script>
45
  var $jq224 = $.noConflict(true);
46
</script>
47
48
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
49
</script>
50
<script>
51
  var $jq321 = $.noConflict(true);
52
</script>
Script Preparation code:
 
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:
  • 1.8.3

     
    tests($jq18);
  • 1.9.1

     
    tests($jq18);
  • 1.12.14

     
    tests($jq112);
  • 2.2.4

     
    tests($jq224);
  • 3.2.1

     
    tests($jq321);