jquery selector test (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<style>
  form, input, select, textarea { display: none; }
</style>
<form id="form">
  <input type="text" />
  <input type="radio" />
  <input type="text" />
  <input type="radio" />
  <select>
    <option>
      a
    </option>
  </select>
  <select>
    <option>
      a
    </option>
  </select>
  <select>
    <option>
      a
    </option>
  </select>
  <textarea>
  </textarea>
  <textarea>
  </textarea>
  <textarea>
  </textarea>
</form>
<input type="text" />
<input type="radio" />
<input type="text" />
<input type="radio" />
<select>
  <option>
    a
  </option>
</select>
<select>
  <option>
    a
  </option>
</select>
<select>
  <option>
    a
  </option>
</select>
<textarea>
</textarea>
<textarea>
</textarea>
<textarea>
</textarea>
</form>

Test runner

Ready to run.

Testing in
TestOps/sec
'#form input,#form select,#form textarea')
jQuery('#form input,#form select,#form textarea');
ready
('#form').find('input,select,textarea')
jQuery('#form').find('input,select,textarea');
ready
context
jQuery('input,select,textarea', jQuery('#form'));
ready
querySelectorAll ( > ie7 http://caniuse.com/queryselector )
jQuery(document.querySelectorAll('#form input,#form select,#form textarea'));
ready
getElementById+ find
jQuery(document.getElementById('form')).find('input,select,textarea');
ready

Revisions

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