HTML Preparation code:
AخA
 
1
<form id="data">
2
  <input name="field1"/>
3
  <input name="field2"/>
4
  <input name="field3"/>
5
  <input name="field4"/>
6
  <input name="field5"/>
7
  <input name="field6"/>
8
  <input name="field7"/>
9
  <input name="field8"/>
10
  <input name="field9"/>
11
  <input name="field10"/>
12
</form>
13
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js'></script>
Script Preparation code:
 
var $element = $("#data");
Tests:
  • find by tag and name attribute

     
    $element.find("input[name='field5']");
  • find by wildcard and name attribute

     
    $element.find("*[name='field5']");
  • find by name attribute

     
    $element.find("[name='field5']");
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    find by tag and name attribute
    find by wildcard and name attribute
    find by name attribute

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Chrome 84 on Windows
View result in a separate tab
Test name Executions per second
find by tag and name attribute 64600.6 Ops/sec
find by wildcard and name attribute 63187.1 Ops/sec
find by name attribute 63231.9 Ops/sec