jQuery children vs find

JavaScript performance comparison

Revision 75 of this test case created by traBolic

Preparation code

<div class="Users">
   <fieldset>
    <input type="hidden" class="toggle" id="a"><h1><legend><label for="a">Adminler</label></legend></h1>
    <div class="KisiListe">asd</div>
   </fieldset>
   <fieldset>
    <input type="hidden" class="toggle" id="m"><h1><legend><label for="m">Müdürler</label></legend></h1>
    <div class="KisiListe">asd</div>
   </fieldset>
   <fieldset>
    <input type="hidden" class="toggle" id="s"><h1><legend><label for="s">Supervisorlar</label></legend></h1>
    <div class="KisiListe">asd</div>
   </fieldset>
   <fieldset>
    <input type="hidden" class="toggle" id="c"><h1><legend><label for="c">Coachlar</label></legend></h1>
    <div class="KisiListe">asd</div>
   </fieldset>
   <fieldset>
    <input type="hidden" class="toggle" id="tl"><h1><legend><label for="tl">Takım Liderleri</label></legend></h1>
    <div class="KisiListe">asd</div>
   </fieldset>
   <fieldset>
    <input type="hidden" class="toggle" id="mt"><h1><legend><label for="mt">Müşteri Temsilcileri</label></legend></h1>
    <div class="KisiListe">asd</div>
   </fieldset>
  </div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    

Preparation code output

<div class="Users"> <fieldset> <input type="hidden" class="toggle" id="a"><h1><legend><label for="a">Adminler</label></legend></h1> <div class="KisiListe">asd</div> </fieldset> <fieldset> <input type="hidden" class="toggle" id="m"><h1><legend><label for="m">Müdürler</label></legend></h1> <div class="KisiListe">asd</div> </fieldset> <fieldset> <input type="hidden" class="toggle" id="s"><h1><legend><label for="s">Supervisorlar</label></legend></h1> <div class="KisiListe">asd</div> </fieldset> <fieldset> <input type="hidden" class="toggle" id="c"><h1><legend><label for="c">Coachlar</label></legend></h1> <div class="KisiListe">asd</div> </fieldset> <fieldset> <input type="hidden" class="toggle" id="tl"><h1><legend><label for="tl">Takım Liderleri</label></legend></h1> <div class="KisiListe">asd</div> </fieldset> <fieldset> <input type="hidden" class="toggle" id="mt"><h1><legend><label for="mt">Müşteri Temsilcileri</label></legend></h1> <div class="KisiListe">asd</div> </fieldset> </div>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
children
$('.Users fieldset h1 legend').children("label");
pending…
find
$('.Users fieldset h1 legend').find('label');
pending…

Compare results of other browsers

Revisions

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

0 Comments

asd

asd

asd

asd

asd

asd