Jquery performance tool (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/prototype/1/prototype.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.3/mootools-yui-compressed.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/yui/2.9.0/build/yuiloader/yuiloader-min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/ext-core/3/ext-core.js"></script>
<script src="//www.cinsoft.net/mylib099-min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<div id="formEdit">
  <input id="CheckBox1" type="checkbox" name="CheckBox1" checked="checked" /><label for="CheckBox1">1</label>
<input id="CheckBox2" type="checkbox" name="CheckBox2" checked="checked" /><label for="CheckBox2">2</label>
<input id="CheckBox3" type="checkbox" name="CheckBox3" checked="checked" /><label for="CheckBox3">3</label>
<input id="CheckBox4" type="checkbox" name="CheckBox4" /><label for="CheckBox4">4</label>
<input id="CheckBox5" type="checkbox" name="CheckBox5" /><label for="CheckBox5">5</label>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
Case 1
alert($("input:checkbox:checked").length);
ready
Case 2
var vLength = $("input:checkbox").filter(function() {
 return $(this).is(":checked");
}).length;
alert(vLength);
ready

Revisions

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