HTML Preparation code:
AخA
 
1
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
2
<div id="#test-root"><div class="test-child"></div></div>   
Tests:
  • Inline Selector

     
    jQuery('#test-root .test-child').css('border', '1px solid red');
  • Find

     
    jQuery('#test-root').find('.test-child').css('border', '1px solid red');
  • Ignore root

     
    jQuery('.test-child').css('border', '1px solid red');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Inline Selector
    Find
    Ignore root

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.58
Chrome 112 on Windows
View result in a separate tab
Test name Executions per second
Inline Selector 1215871.4 Ops/sec
Find 4071834.8 Ops/sec
Ignore root 604407.6 Ops/sec