find-vs-children

Benchmark created by t32k on


Preparation HTML

<ul id="js-list">
  <li>1</li>
  <li>2</li>
  <li>3</li>
  <li>4</li>
  <li>5</li>
  <li>6</li>
  <li>7</li>
  <li>8</li>
  <li>9</li>
  <li>10</li>
</ul>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Find
$('#js-list').find('li');
ready
Descendant
$('#js-list li');
ready
Children
$('#js-list > li');
ready

Revisions

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