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');
  • Include types

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

     
    jQuery('#test-root').find('div.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
    Include types
    include find type

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128 on Linux
View result in a separate tab
Test name Executions per second
Inline Selector 425455.7 Ops/sec
Find 1611548.6 Ops/sec
Ignore root 122357.9 Ops/sec
Include types 412584.6 Ops/sec
include find type 1606244.4 Ops/sec