jQuery children vs find

JavaScript performance comparison

Revision 18 of this test case created

Info

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

Preparation code

<body id="ctl00_tagBody">
        <form method="post" action="/connect-with-us/" id="aspnetForm" enctype="multipart/form-data" onsubmit="return (&#39;undefined&#39; == typeof Ektron || !Ektron.FormBlock || !typeof Ektron.FormBlock.validate  || Ektron.FormBlock.validate(this));">
<div class="aspNetHidden">
<input type="hidden" name="EktronClientManager" id="EktronClientManager" value="-1759591071,-1028352248,1948574407,-1388997516,2009761168,27274999,1979897163,-422906301,-1818005853,646551512,-1228755533,561009152,1762586108,1881432062,1080084488,-1562465382" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE0MjE4MDM4MDkPZBYCZg9kFgICAw9kFgICARAWAh4Ib25zdWJtaXQFhAFyZXR1cm4gKCd1bmRlZmluZWQnID09IHR5cGVvZiBFa3Ryb24gfHwgIUVrdHJvbi5Gb3JtQmxvY2sgfHwgIXR5cGVvZiBFa3Ryb24uRm9ybUJsb2NrLnZhbGlkYXRlICB8fCBFa3Ryb24uRm9ybUJsb2NrLnZhbGlkYXRlKHRoaXMpKTtkZGQxCg2wn32K9IpAirbkz0GpFdXSKUw3vxMsVyIuJcO6fg==" />
</div>

<div class="aspNetHidden">

        <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBwLvg72dBQLmhpfQAwKIys/IDwLhk/27CgKOyKu3DwKrge3iCALDpeL5CV83+pwumaTABaq6CAnTTisHz3b/ZICtv+Axzp1MOFqi" />

</div>
                <div class="site-wrap">
                       

<div class="header-main-wrap">
        <header class="careers-main">
                <h1 class="logo"><a href="/"><img src="/ui/global-header/images/walmart-logo.png" alt="Walmart" /></a></h1>
                <p class="slogan"><img src="/ui/global-header/images/walmart-slogan.png" alt="Walmart Careers - Making Better Possible" /></p>
                <nav class="social">
                <span id="ctl00_Header_fmSocialLinksWithIcon"><ul><li><a target="_blank" href="http://www.facebook.com/walmartcareers"><img src="/uploadedImages/facebook-icon.png" alt="Facebook" /></a></li><li><a target="_blank" href="http://www.youtube.com/playlist?list=PL14ED977FFA38F193"><img src="/uploadedImages/youtube-icon.png" alt="YouTube" /></a></li><li><a target="_blank" href="http://twitter.com/WalmartCareers"><img src="/uploadedImages/twitter-icon.png" alt="Twitter" /></a></li><li><a target="_blank" href="http://www.linkedin.com/company/walmart/careers"><img src="/uploadedImages/linkedin-icon.png" alt="LinkedIn" /></a></li></ul></span>

                </nav>
                <nav class="main">
            <span id="ctl00_Header_fmMainMenu"><ul class="careers"><li><a class="nav-t1" href="/default.aspx">Home</a></li><li><a class="nav-t1" href="/who-are-we/">Who We Are</a></li><li><a class="nav-t1" href="/our-career-areas/">Career Areas</a></li><li class="droppable"><a class="nav-t1" href="/people/">People</a><div class="drop-wrap">
    <ul class="drop type1" >
  <li id="Current-Associates"></li>

          </ul>
       </div></li><li><a class="&#xD;&#xA;                  nav-t1 selected&#xD;&#xA;                " href="/connect-with-us/">Connect With Us</a></li><li><a class="nav-t1" href="/SearchJob.aspx">Search Jobs &amp; Apply</a></li></ul></span>
                                       
                <span id="ctl00_Header_fmSocialLinksWithoutIcon"><ul class="walmart"><li><a class="nav-t1" target="_blank" href="http://www.walmart.com">Walmart.com</a></li><li><a class="nav-t1" href="/military-friendly-employer/">Military</a></li></ul></span>
                        <div class="search">
                                <input id="search" type="text" placeholder="Search"/>
                                <button type="button"  onclick="fnSearch()" class="button go" name="a">

                                        <span>Go</span>
                                </button>
                        </div>
                </nav>
        </header>
</div>

                        <div class="main-wrap">
                               
<nav class="secondary module" data-module-path="/static/build/common/js/ui/global/scripts/custom/isolated/nav-secondary.js">

        <section class="career-search">
                <h3>Career Search</h3>
           
                    <div class="select-wrap categories-dropdown">                                                              
                                        <select multiple="multiple" name="Question440__FORMTEXT12" id="search-container" class="ui-dropdownchecklist-text-static">                                
                                <option value="" title="All">All</option>
                                <option value="101" title="Accounting/Auditing">Accounting/Auditing</option>
                                <option value="102" title="Administrative and Support Services">Administrative and Support Services</option>

                                <option value="103" title="Advertising">Advertising</option>
                                <option value="104" title="Aerospace/Aviation">Aerospace/Aviation</option>
                                <option value="107" title="Architectural Services">Architectural Services</option>
                                <option value="109" title="Automotive/Motor Vehicle/Parts">Automotive/Motor Vehicle/Parts</option>
                                <option value="112" title="Building and Grounds Maintenance">Building and Grounds Maintenance</option>
                                <option value="115" title="Computer Services">Computer Services</option>

                                <option value="116" title="Computers, Hardware">Computers, Hardware</option>
                                <option value="117" title="Computers, Software">Computers, Software</option>
                                <option value="118" title="Construction">Construction</option>
                                <option value="120" title="Consumer Products">Consumer Products</option>
                                <option value="121" title="Creative/Design">Creative/Design</option>
                                <option value="122" title="Customer Service and Call Center">Customer Service and Call Center</option>

                                <option value="123" title="Driver">Driver</option>
                                <option value="125" title="Electronics">Electronics</option>
                                <option value="127" title="Energy/Utilities">Energy/Utilities</option>
                                <option value="128" title="Engineering">Engineering</option>
                                <option value="129" title="Entertainment">Entertainment</option>
                                <option value="130" title="Environmental Services">Environmental Services</option>

                                <option value="131" title="Executive Management">Executive Management</option>
                                <option value="132" title="Finance/Economics">Finance/Economics</option>
                                <option value="133" title="Financial Services">Financial Services</option>
                                <option value="134" title="Government and Policy">Government and Policy</option>
                                <option value="135" title="Healthcare - Business Office &amp; Finance">Healthcare - Business Office &amp; Finance</option>

                                <option value="139" title="Healthcare - Medical &amp; Dental Practitioners">Healthcare - Medical &amp; Dental Practitioners</option>
                                <option value="141" title="Healthcare - Optical">Healthcare - Optical</option>
                                <option value="142" title="Healthcare - Other">Healthcare - Other</option>
                                <option value="143" title="Healthcare - Pharmacy">Healthcare - Pharmacy</option>
                                <option value="150" title="Human Resources/Recruiting">Human Resources/Recruiting</option>

                                <option value="151" title="Information Technology">Information Technology</option>
                                <option value="152" title="Installation, Maintenance, and Repair">Installation, Maintenance, and Repair</option>
                                <option value="154" title="Internet/E-Commerce">Internet/E-Commerce</option>
                                <option value="155" title="Law Enforcement/Security Srvs">Law Enforcement/Security Srvs</option>
                                <option value="156" title="Legal">Legal</option>
                                <option value="159" title="Manufacturing and Production">Manufacturing and Production</option>

                                <option value="160" title="Marketing">Marketing</option>
                                <option value="161" title="Media">Media</option>
                                <option value="195" title="Merchandising">Merchandising</option>
                                <option value="197" title="Merchandising/ Sourcing">Merchandising/ Sourcing</option>
                                <option value="162" title="Military/Defense">Military/Defense</option>
                                <option value="164" title="Nonprofit">Nonprofit</option>

                                <option value="165" title="Operations Management">Operations Management</option>
                                <option value="166" title="Other">Other</option>
                                <option value="168" title="Pharmaceutical">Pharmaceutical</option>
                                <option value="169" title="Printing/Editing/Writing">Printing/Editing/Writing</option>
                                <option value="193" title="Product Management">Product Management</option>
                                <option value="170" title="Product Management/Marketing">Product Management/Marketing</option>

                                <option value="171" title="Project/Program Management">Project/Program Management</option>
                                <option value="172" title="Public Relations">Public Relations</option>
                                <option value="173" title="Purchasing">Purchasing</option>
                                <option value="174" title="Quality Assurance/Safety">Quality Assurance/Safety</option>
                                <option value="175" title="Real Estate/Mortgage">Real Estate/Mortgage</option>
                                <option value="176" title="Research &amp; Development">Research &amp; Development</option>

                                <option value="177" title="Restaurant and Food Service">Restaurant and Food Service</option>
                                <option value="178" title="Retail/Wholesale">Retail/Wholesale</option>
                                <option value="179" title="Sales">Sales</option>
                                <option value="180" title="Sales - Account Management">Sales - Account Management</option>
                                <option value="181" title="Sales - Telemarketing">Sales - Telemarketing</option>
                                <option value="183" title="Science">Science</option>

                                <option value="184" title="Sports and Recreation/Fitness">Sports and Recreation/Fitness</option>
                                <option value="196" title="Strategy">Strategy</option>
                                <option value="185" title="Supply Chain/Logistics">Supply Chain/Logistics</option>
                                <option value="186" title="Telecommunications">Telecommunications</option>
                                <option value="189" title="Training">Training</option>
                                <option value="190" title="Transportation">Transportation</option>

                                <option value="194" title="User Experience">User Experience</option>
                                <option value="192" title="Warehousing">Warehousing</option>
                            </select>
                        </div>  
                    <div class="select-wrap">
                         <label for="" class="" >Keywords:</label>
                                    <input class="keywords" name="initialKeyword" id="initialKeyword" maxlength="50" size="23" />
                    </div>

                    <input id="SiteId" name="SiteId" style="display:none;" />
                    <button type="submit" class="button go" name="a">
                        <span>Search</span>
                    </button>  
               
       
        </section>


    <span id="ctl00_VerticalNav_fmSocialLinksWithIcon"><ul class="main"></ul></span>
</nav>
                               
                                 
<div class="content-all-wrap" >
<section class="content-all t3" style="min-height:490px;">
<div class="content-main module" data-module-path="/static/build/common/js/ui/global/scripts/custom/isolated/connect-with-us.js">
 <input type="hidden" name="ctl00$cphMain$hdnYtube_List" id="ctl00_cphMain_hdnYtube_List" value="PL14ED977FFA38F193" />
 <input type="hidden" name="ctl00$cphMain$hdnYtube_API" id="ctl00_cphMain_hdnYtube_API" value="https://gdata.youtube.com/feeds/api/playlists/14ED977FFA38F193?v=2&amp;alt=jsonc" />
 <input type="hidden" name="ctl00$cphMain$hdnFb_Href" id="ctl00_cphMain_hdnFb_Href" value="http%3A%2F%2Fwww.facebook.com%2Fwalmartcareers&amp;amp" />
 <input type="hidden" name="ctl00$cphMain$hdnFb_API" id="ctl00_cphMain_hdnFb_API" value="https://graph.facebook.com/walmartcareers?callback=?" />
 <input type="hidden" name="ctl00$cphMain$hdnTwitter_Url" id="ctl00_cphMain_hdnTwitter_Url" value="http://api.twitter.com/1/users/show.json" />
 <input type="hidden" name="ctl00$cphMain$hdnLinked_Url" id="ctl00_cphMain_hdnLinked_Url" value="http://platform.linkedin.com/in.js" />

                    <h2>Walmart Careers Social Community</h2>                  
                    <div class="featured-section connect">
                        <div class="connect-wrap">
                            <div class="widget-frame">
                                <div class="social-panel">
                                    <div class="panel-content">
                                        <a class="button close" href="#"></a>
                                        <img class="loader" alt="loading" src="../common/gfx/ajax-loader.gif"/>
                                        <div id="facebook-div"></div>

                                    </div>
                                    <img class="icon" src="../common/images/connect-with-us/images/fb-connect-landing.png" alt=Facebook" />
                                    <p class="stat"></p>
                                    <a class="button open facebook" href="#"></a>
                                    <img class="background" width="262" height="178" src="../common/images/connect-with-us/gfx/panel-bg.png" alt="panel bg" />
                                </div>
                                <div class="social-panel">
                                    <div class="panel-content">
                                        <a class="button close" href="#"></a>

                                        <img class="loader" alt="loading" src="../common/gfx/ajax-loader.gif"/>
                                        <div id="youtube-div"></div>
                                    </div>
                                    <img class="icon" src="../common/images/connect-with-us/images/youtube-connect-landing.png" alt=Facebook" />
                                    <p class="stat"></p>
                                    <a class="button open youtube" href="#"></a>
                                    <img class="background" width="262" height="178" src="../common/images/connect-with-us/gfx/panel-bg.png" alt="panel bg" />
                                </div>
                                <div class="social-panel">

                                    <div class="panel-content">
                                        <a class="button close" href="#"></a>
                                        <img class="loader" alt="loading" src="../common/gfx/ajax-loader.gif"/>
                                        <div id="twitter-div"></div>
                                    </div>
                                    <img class="icon" src="../common/images/connect-with-us/images/twitter-connect-landing.png" alt=Facebook" />
                                    <p class="stat"></p>
                                    <a class="button open twitter" href="#"></a>
                                    <img class="background" width="262" height="178" src="../common/images/connect-with-us/gfx/panel-bg.png" alt="panel bg" />

                                </div>
                                <div class="social-panel">
                                    <div class="panel-content">
                                        <a class="button close" href="#"></a>
                                        <img class="loader" alt="loading" src="../common/gfx/ajax-loader.gif"/>
                                        <div id="linkedin-div">
                                        <script type="IN/CompanyProfile" data-id="2646" data-width="515" data-format="inline"></script>
                                        </div>

                                    </div>
                                    <img class="icon" src="../common/images/connect-with-us/images/linkedin-connect-landing.png" alt=Facebook" />
                                    <p class="stat"></p>
                                    <a class="button open linkedin" href="#"></a>
                                    <img class="background" width="262" height="178" src="../common/images/connect-with-us/gfx/panel-bg.png" alt="panel bg" />
                                </div>
                            </div>
                            <div class="news">
                                <div class="background"></div>

                                <div class="feed">
                                    <a class="button close" href="#"></a>
                                    <h3>Recent News</h3>
                                    <ul>
                                    </ul>
                                </div>          

                            </div>
                        </div>
                    </div>

                </div>

                <script id="feedTemplate" type="text/x-jquery-tmpl">
                    <li>
                        <strong>${publishedDate}</strong> -
                        <a href="${link}" target="_blank">${title}</a>
                        <div class="content" style="display: none;">
                            <p>${content}</p>
                            <a href="${link}" class="button more" target="_blank">
                                <span>More</span>
                            </a>
                        </div>
                    </li>
                </script>

                  </section>
                  </div>

                       
                               
<footer class="careers-footer">

        <nav class="footer">
    <span id="ctl00_Footer_TopMenu"><ul class="main"><li><a href="/default.aspx">Home</a></li><li><a href="/who-are-we/">Who We Are</a></li><li><a href="/our-career-areas/">Career Areas</a></li><li><a href="/people/">People</a></li><li><a href="/connect-with-us/">Connect With Us</a></li><li><a href="/SearchJob.aspx">Search Jobs &amp; Apply</a></li></ul></span>
        </nav>
        <section class="form">
        <div id="ctl00_Footer_fbSignUpCareer_content" class="design_content design_mode_entry" contentEditable="false" onmouseover="try{ Ektron.FormBlock.setState('__ekFormState_ctl00_Footer_fbSignUpCareer', 'in') }catch(ex){}" onmouseout="try{ Ektron.FormBlock.setState('__ekFormState_ctl00_Footer_fbSignUpCareer', 'out') }catch(ex){}">

<input type="hidden" id="__ekFormId_ctl00_Footer_fbSignUpCareer" name="__ekFormId_ctl00_Footer_fbSignUpCareer" value="428" />
<input type="hidden" id="__ekFormState_ctl00_Footer_fbSignUpCareer" name="__ekFormState_ctl00_Footer_fbSignUpCareer" value="out" />
<input type="hidden" id="ApplicationAPI428" name="ApplicationAPI428" value="postback" />
<input type="hidden" name="EktFormId" value="428" />
<input type="hidden" name="EktFormTitle" value="Career SignUp Form" />
<input type="hidden" name="EktFormDescription" value="Sign up for career information" />
<input type="hidden" name="EktFormLang" value="1033" />
<input type="hidden" name="EktFormPublishDate" value="2/20/2012 1:09:13 PM" />
<div class="SendForm"><h4>Sign up for career information</h4>
<input name="fullname" title="name" class="design_textfield" id="name" type="text" size="24" ektdesignns_caption="name" placeholder="Enter Full Name" ektdesignns_name="name" ektdesignns_nodetype="element" /> <input name="email" title="email" class="design_textfield" id="email" type="text" size="24" ektdesignns_caption="email" placeholder="Email" ektdesignns_name="email" ektdesignns_nodetype="element" /><input name="zipcode" title="zipCode" class="design_textfield" id="zipCode" type="text" size="24" ektdesignns_caption="zipCode" placeholder="Zip Code" ektdesignns_name="zipCode" ektdesignns_nodetype="element" /><div class="select-wrap"><select name="areaOfInterest" title="areaOfInterest" class="select-reg" id="areaOfInterest" size="1" ektdesignns_caption="areaOfInterest" ektdesignns_name="areaOfInterest" ektdesignns_nodetype="element" ektdesignns_maxoccurs="1">
 <option selected="selected" value="All">Area of Interest</option>
 <option value="technology">Technology</option>

 <option value="finance_Accounting_Internal_Audit">Finance/Accounting/Internal Audit</option>
 <option value="merchandising_Replenishment">Merchandising/Replenishment</option>
 <option value="marketing_Communications_Corporate_Affairs">Marketing/Communications/Corporate Affairs</option>
 <option value="logistics_Supply Chain">Logistics/Supply Chain</option>
 <option value="asset_Protection">Asset Protection</option>
 <option value="HR_Benefits_Legal">HR/Benefits/Legal</option>

 <option value="real_Estate_Store_Planning">Real Estate/Store Planning</option>
 <option value="store_Club Hourly">Store/Club Hourly</option>
 <option value="store_Club Management">Store/Club Management</option>
 <option value="distribution_Transportation ">Distribution/Transportation</option>
 <option value="health_and_Wellness">Health and Wellness</option>
 <option value="global_eCommerce">Global eCommerce</option>

 <option value="Global_Sourcing">Global Sourcing</option>
</select></div>
<span class="button submit"><input type="submit" value="SUBMIT" /></span><div style="clear: both;">&#160;</div>
<div><a href="http://careers.walmart.bgtpartners.com/layouts/sitemap.aspx">Site Map</a> <span style="padding: 10px 0px; color: rgb(26, 117, 207); float: left;">&#160;|&#160;</span> <a href="http://walmartstores.com/PrivacySecurity/9243.aspx" target="_blank">View Privacy Policy</a></div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</body>

Preparation code output

Walmart Careers Social Community