jQuery children vs find (v39)

Revision 39 of this benchmark created on


Description

This testcase compares the performance from .children() and .find()

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="test111"><div class="line"></div><div class="line"></div><div class="node"></div><div class="ckbox checked"><input type="checkbox" value="test1.1.1" name="name" text="Test 1.1.1" style="display:none;" checked="checked"></div><div class="file"></div><a checked="true" tvalue="test1.1.1" tname="name">Test 1.1.1</a></div>

Test runner

Ready to run.

Testing in
TestOps/sec
children
$('#test111').children('.ckbox');
ready
find
$('#test111').find('.ckbox');
ready
children
$('#test111').children('a');
ready
find
$('#test111').find('a');
ready
children with filter
$('#test111').children().filter('a');
ready
children with filter
$('#test111').children().filter('.ckbox');
ready
children with last
$('#test111').children().last();
ready
find with last
$('#test111').find(':last');
ready

Revisions

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