Jquery versions Benchmarch (latest - 3.5.1)
SImple benchmark of jQuery versions
Date tested:
7 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
Benchmark definition (click to collapse):
HTML Preparation code:
<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.5.1/jquery.min.js"> </script> <script> var $jq321 = $.noConflict(true); </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