HTML Preparation code:
x
 
1
<form id="parent">
2
  <input type="checkbox"/>
3
  <input type="checkbox"/>
4
  <input type="checkbox"/>
5
  <input type="checkbox"/>
6
  <input type="checkbox"/>
7
  <input type="checkbox"/>
8
  <input type="checkbox"/>
9
  <input type="checkbox"/>
10
  <input type="checkbox"/>
11
  <input type="checkbox"/>
12
</form>
13
14
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js'></script>
Script Preparation code:
 
var $formElement = $("#parent");
Tests:
  • find by input and checkbox selector

     
    $formElement.find("input:checkbox");
  • find by checkbox selector

     
    $formElement.find(":checkbox");
  • find by input and type checkbox

     
    $formElement.find("input[type='checkbox']");
  • find by type checkbox

     
    $formElement.find("[type='checkbox']");
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    find by input and checkbox selector
    find by checkbox selector
    find by input and type checkbox
    find by type checkbox

    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; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78 on Windows
View result in a separate tab
Test name Executions per second
find by input and checkbox selector 30218.7 Ops/sec
find by checkbox selector 32901.9 Ops/sec
find by input and type checkbox 105631.2 Ops/sec
find by type checkbox 118652.3 Ops/sec