Big Checkbox Test (v3)

Revision 3 of this benchmark created on


Description

Test various options for creating checkboxes, and linking them together with events.

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<table>
  <tr>
    <td>
      <input type="checkbox" class="cb rid-1" />
    </td>
    <td>
      <input type="checkbox" class="cb rid-2" />
    </td>
    <td>
      <input type="checkbox" class="cb rid-3" />
    </td>
    <td>
      <input type="checkbox" class="cb rid-4" />
    </td>
    <td>
      <input type="checkbox" class="cb rid-5" />
    </td>
    <td>
      <input type="checkbox" class="cb rid-6" />
    </td>
    <td>
      <input type="checkbox" class="cb rid-7" />
    </td>
  </tr>
</table>
<script>
  var $dummy = $('<input type="checkbox" class="dummy-checkbox" disabled="disabled" checked="checked" />').attr('title', 'this is some title').hide();
  
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
input:checkbox
$('input:checkbox');
 
ready
:checkbox
$(':checkbox');
 
ready
[type=checkbox]
$('[type=checkbox]');
ready
input[type=checkbox]
$('input[type=checkbox]');
 
ready
:not()
$('input[type=checkbox]:not(.rid-2,.rid-1)');
 
ready
.not()
$('input[type=checkbox]').not('.rid-2,.rid-1');
 
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.