HTML Preparation code:
AخA
 
1
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
2
<script>
3
  var $jq183 = $.noConflict(true);
4
</script>
5
<script src='https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js'></script>
6
<script>
7
  var $jq203 = $.noConflict(true);
8
</script>
9
<div>
10
  <ul id="menu">
11
    <li class="menu-item">1</li>
12
    <li class="menu-item">2</li>
13
    <li class="menu-item">3</li>
14
    <li class="menu-item">4</li>  
15
  </ul>
16
</div>
Script Preparation code:
 
function tests($) {
    $(".menu-item").eq(2).closest("ul").css({
      "background-color": "red"
    }).parent().css({
      "border": "1px solid blue"
    }).append($("<p></p>").text("Text.").css({
      "background-color": "green"
    })).end().end().remove();
  console.log('tests' + $);
}
Tests:
  • Test jQuery 1.8.3

     
    tests($jq183);
  • Test jQuery 2.0.3

     
    tests($jq203);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Test jQuery 1.8.3
    Test jQuery 2.0.3

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Test jQuery 1.8.3 127522.0 Ops/sec
Test jQuery 2.0.3 130626.0 Ops/sec