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

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

     
    jQuery('#test-root').find('[name=test-child]').css('border', '1px solid red');
  • Name Selector

     
    jQuery('[name=test-child]').css('border', '1px solid red');
  • Context Object Selector

     
    jQuery('[name=test-child]', jQuery('#test-root')).css('border', '1px solid red');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Context Selector
    Find
    Name Selector
    Context Object Selector

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
Chrome 99 on Windows
View result in a separate tab
Test name Executions per second
Context Selector 1034571.3 Ops/sec
Find 1180201.2 Ops/sec
Name Selector 85347.7 Ops/sec
Context Object Selector 783397.1 Ops/sec