doc vs jquery

Benchmark created by Kory on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://rawgithub.com/KoryNunn/doc/master/doc.js"></script>



<div class="content" id="main"><span class="ctr-p" id="body" data-jiis="bp"><center><div id="lga" style="height:231px;margin-top:20px"><img alt="Google" height="95" src="/images/srpr/logo11w.png" width="269" id="hplogo" onload="window.lol&amp;&amp;lol()" style="padding-top:112px"></div><div style="height:102px"></div><div id="prm-pt" style="font-size:83%;min-height:3.5em"><br></div></center></span><div class="ctr-p" id="footer" data-jiis="bp">  <span style="display:none">&nbsp;</span> <div id="footcnt"><style>.fhp{bottom:0;left:0;position:absolute;right:0}.fbar p{color:#777;display:inline}.fbar a,#fsettl{color:#777;text-decoration:none;white-space:nowrap}.fbar a:hover{color:#333}.fbard a:hover{text-decoration:underline}.fdl img{margin-right:4px}.fdl a,.fbarh #swml a{text-decoration:none}.fmulti{text-align:center}.fmulti #fsr{display:block;float:none}.fmulti #fuser{display:block;float:none}#fsr{float:right;white-space:nowrap}#fsl{white-space:nowrap}.fbard #fsettl:hover{text-decoration:underline}.fbard #fsett a:hover{text-decoration:underline}.fbtnr,.fbtnl{height:13px;width:8px}.fbtnr:before,.fbtnl:before{border:8px solid rgba(255,255,255,0);border-radius:8px;content:'';position:absolute}.fbtnr:before{border-left:8px solid #777;left:1px}.fbtnl:before{border-right:8px solid #777;left:-9px}.fbtnr:after,.fbtnl:after{border:12px solid rgba(255,255,255,0);content:'';position:absolute;top:-4px}.fbtnr:after{border-left:10px solid #f6f6f6;left:-4px}.fbtnl:after{border-right:10px solid #f6f6f6;left:-10px}.fbtns-card .fbtnr:after{border-left:10px solid white}.fbtns-card .fbtnl:after{border-right:10px solid white}.fbar>.nes{line-height:22px}.fbar .fbl{padding:0 0 0 27px !important;margin:0 !important}.fbar .fblf{padding:0 !important;margin:0 !important}</style> <style>.fbar{background:#f2f2f2;border-top:1px solid #e4e4e4;font-size:small;line-height:40px;min-width:980px}.fbarspacing{margin-left:135px}</style> <style>#fsl{margin-left:30px}#fsr{margin-right:30px}.fmulti #fsl{margin-left:0}.fmulti #fsr{margin-right:0}</style> <div class="fhp fbard" id="fbar"> <div class="fbar"> <span id="fsr">  <a class="fblf" href="/intl/en/policies/?fg=1" style="white-space:normal"> <span style="color:#b14436">New</span> Privacy &amp; Terms</a>  <span style="display:inline-block;position:relative"><style>#fsett{background:#fff;border:1px solid #999;bottom:30px;padding:10px 0;position:absolute;box-shadow:0 2px 4px rgba(0,0,0,0.2);-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.2);text-align:left;z-index:100}#fsett a{color:#777;display:block;line-height:44px;padding:0 20px;text-decoration:none;white-space:nowrap}#fsett a:hover{color:#333}</style> <a href="https://www.google.com/preferences?hl=en" class="fbl" jsaction="foot.cst" id="fsettl">Settings</a> <span id="fsett" style="display:none"> <a href="https://www.google.com/preferences?hl=en&amp;fg=1">Search settings</a> <span data-jibp="h" data-jiis="uc" id="advsl"> <a href="/advanced_search?hl=en&amp;fg=1">Advanced search</a> </span> <a href="/history?hl=en&amp;fg=1">Web History</a> <a href="//support.google.com/websearch/?p=ws_results_help&amp;hl=en&amp;fg=1">Search Help</a> <a href="javascript:void(0)" data-bucket="websearch" jsaction="gf.sf" target="_blank" id="fblqf" data-ved="0CAYQLg">  Send feedback </a> </span> </span>  <a class="fbl" href="https://www.google.com/setprefdomain?prefdom=AU&amp;prev=https://www.google.com.au/&amp;sig=0_EXhzOBw1ldse-wRdDyW3aIvOSZY%3D&amp;fg=1">Google.com.au</a> </span> <span id="fsl"> <a class="fblf" href="/intl/en/ads/?fg=1">Advertising</a> <a class="fbl" href="/services/?fg=1">Business</a> <a class="fbl" href="/intl/en/about.html?fg=1">About</a> </span>  </div>  </div> </div>  </div></div>

Test runner

Ready to run.

Testing in
TestOps/sec
doc().find()
doc('#lga').find('.ctr-p')();
ready
jquery().find()
$('#lga').find('.ctr-p');
ready
doc().is()
doc('.ctr-p').is('.ctr-p')();
ready
jquery().is()
$('.ctr-p').is('.ctr-p');
ready

Revisions

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