Jquery versions Benchmarch (latest - 3.5.1)

SImple benchmark of jQuery versions
11 months ago
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0
Test name Executions per second
1.8.3 62943.4 Ops/sec
1.9.1 63228.0 Ops/sec
1.12.14 88364.1 Ops/sec
2.2.4 90047.0 Ops/sec
3.5.1 82436.7 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.5.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.5.1

     
    tests($jq321);
Open this result on MeasureThat.net