querySelectorAll vs getElementsByTagName (v107)

Revision 107 of this benchmark created on


Preparation HTML

<span id="pb-core-loaded"></span><div style="height: 40px;"></div><div class="centerParent" id="shellTD" style="width: 100%;"><div class="center" id="shellTBL" style="width: 935px;"><div class="centerParent"><div class="center" id="mainTD" style="width: 895px;"><div class="floatLeft" id="brandModeTD" style="width: 475px;"><div id="productTD" style="width: 475px;"><iframe width="475" height="490" id="i0278" src="https://sc.imp.live.com/content/dam/imp/surfaces/mail_signin/v3/account/EN-CA.html?id=38936&amp;mkt=EN-CA" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div></div><div class="floatLeft" id="signInTD" style="width: 420px; position: relative;"><div style="height: 40px;"></div><div class="signInHeader" id="i0272"><h1 class="loginhead">Sign in</h1></div><div style="height: 30px;"></div><div class="floatLeft" style="width: 100px; height: 370px;"></div><div class="floatLeft" style="width: 320px;"><div id="rightTD"><form name="f1" spellcheck="false" method="post" target="_top" novalidate="" autocomplete="off" pb-autologin="true"><div class="section"><div id="idTd_Tile_Error" aria-live="assertive" aria-relevant="text" style="display: none;" aria-atomic="true"><div class="errorDiv first" id="idTd_Tile_ErrorMsg_Login"></div></div><div id="idTd_PWD_Error" aria-live="assertive" aria-relevant="text" style="display: none;" aria-atomic="true"><div class="errorDiv first" id="idTd_PWD_ErrorMsg_Username">Generic Password Error Message</div></div><div class="row label" id="idTd_PWD_UsernameLbl"><span id="idLbl_PWD_Username" role="heading">Microsoft account <a id="idA_MSAccLearnMore" href="http://go.microsoft.com/fwlink/?LinkID=254486" target="_blank">What's this?</a></span></div><div class="row textbox" id="idDiv_PWD_UsernameTb"><div style="width: 100%; position: relative;"><input name="login" class="ltr_override" id="i0116" aria-labelledby="idLbl_PWD_Username" lang="en" type="email" maxlength="113"><div class="phholder" style="left: 0px; top: 0px; width: 100%; position: absolute; z-index: 5;"><div class="placeholder ltr_override" id="idDiv_PWD_UsernameExample" aria-hidden="true" style="cursor: text;" pb-role="username">someone@example.com</div><passwordboxicon style='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bXAuZGlkOjA5M0ZFMjdFRDI5NDExRTE5Njc0OTU4Rjk3NzgwODJEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+MHuEgAAAAWtJREFUeNq8VCFMxEAQ3DZ1RRdfSUBTcg6JwdfjeQsaJCXYDxZ03/+7BtD/BsMLDAFdXebu9r7bpnxLSZhkvr9719vu7uxRVVXUiUlxDUbCjo2vA/qMPvr0M17AI2En7BsFX3xxBIZi7Qk8FvYh+9z+sJHx4EBEMXiHlw+MlalP/M7E+ox9xHvu+Z1B8HT9PM+r+0B0CU5x6DP7FAcu2NYlPAOv4HtzPfpdIFcSIs2Sgy7Bd/DEHO7WMlVKMfRii+rOwVTYqfGNVF2wkbJUW6ZyPCNTwho5Z6j3n7I4HC76Egq4/l0bS5b0XMi75P05B7a46S9dsGXt0WQwKXbwfAVT7tEotFWnG637sDJfbUv0Be6Ba/jm7NsHb50ghojBb1wxdjZWXBo3pB/ggkvnyrbmmYvHDGxomuqC2Ox2zazYeYk3N0emHoTUB6HuUaaWrbWkceXY/7U4eFjHZEQdgRatSzb5kxj+A98CDADG3MBsPyzvawAAAABJRU5ErkJggg==") no-repeat right; left: 281px; top: 6px; width: 30px; height: 20px; position: absolute; z-index: auto;' pb-icon="username"></passwordboxicon></div></div></div><div id="idTd_PWD_Error_Password" aria-live="assertive" aria-relevant="text" style="display: none;" aria-atomic="true"><div class="errorDiv" id="idTd_PWD_ErrorMsg_Password"></div></div><div class="row textbox" id="idDiv_PWD_PasswordTb"><div style="width: 100%; position: relative;"><input name="passwd" id="i0118" aria-labelledby="idDiv_PWD_PasswordExample" type="password" autocomplete="off"><div class="phholder" style="left: 0px; top: 0px; width: 100%; position: absolute; z-index: 5;"><div class="placeholder" id="idDiv_PWD_PasswordExample" aria-hidden="true" style="cursor: text;" pb-role="password">Password</div><passwordboxicon style='background: url("data:image/png;base64,iVBORw0KGgoAA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NDExRTE5Njc0OTU4Rjk3NzgwODJEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+MHuEgAAAAWtJREFUeNq8VCFMxEAQ3DZ1RRdfSUBTcg6JwdfjeQsaJCXYDxZ03/+7BtD/BsMLDAFdXebu9r7bpnxLSZhkvr9719vu7uxRVVXUiUlxDUbCjo2vA/qMPvr0M17AI2En7BsFX3xxBIZi7Qk8FvYh+9z+sJHx4EBEMXiHlw+MlalP/M7E+ox9xHvu+Z1B8HT9PM+r+0B0CU5x6DP7FAcu2NYlPAOv4HtzPfpdIFcSIs2Sgy7Bd/DEHO7WMlVKMfRii+rOwVTYqfGNVF2wkbJUW6ZyPCNTwho5Z6j3n7I4HC76Egq4/l0bS5b0XMi75P05B7a46S9dsGXt0WQwKXbwfAVT7tEotFWnG637sDJfbUv0Be6Ba/jm7NsHb50ghojBb1wxdjZWXBo3pB/ggkvnyrbmmYvHDGxomuqC2Ox2zazYeYk3N0emHoTUB6HuUaaWrbWkceXY/7U4eFjHZEQdgRatSzb5kxj+A98CDADG3MBsPyzvawAAAABJRU5ErkJggg==") no-repeat right; left: 281px; top: 6px; width: 30px; height: 20px; position: absolute; z-index: auto;' pb-icon="password"></passwordboxicon></div></div></div><div id="idTd_PWD_KMSI_Cb"><input name="KMSI" id="idChkBx_PWD_KMSI0Pwd" type="checkbox" value="1"><label id="idLbl_PWD_KMSI_Cb" for="idChkBx_PWD_KMSI0Pwd">Keep me signed in</label></div></div><div class="section" id="idTd_PWD_SubmitCancelTbl"><input name="SI" class="default" id="idSIButton9" type="submit" value="Sign in" pb-role="submit"></div><div class="section"><div class="row small" id="idDiv_PWD_ForgotPassword"><a id="idA_PWD_ForgotPassword" href="https://account.live.com/ResetPassword.aspx?wreply=https://login.live.com/login.srf%3flc%3d4105%26sf%3d1%26id%3d38936%26ru%3dhttps://account.live.com/%253fmkt%253dEN-CA%2526lc%253d1033%2526id%253d38936%26tw%3d0%26fs%3d0%26kv%3d0%26cb%3d%26cbcxt%3d%26wp%3dSAPI%26wa%3dwsignin1.0%26wreply%3dhttps://account.live.com/%253fmkt%253dEN-CA%2526lc%253d1033%2526id%253d38936%26bk%3d1418142257&amp;id=38936&amp;uiflavor=web&amp;uaid=044b77b4ae9b4935aae90dc9f8e32929&amp;mkt=EN-CA&amp;lc=4105&amp;bk=1418142257">Can't access your account?</a></div><div class="row small" id="idTD_PWD_SwitchToOTCLink"><a id="idA_PWD_SwitchToOTC" href="">Sign in with a single-use code</a></div></div></form></div><div class="SignUp" id="SignUpTD" style="visibility: hidden;"><span>Don't have a Microsoft account?</span> <a class="TextSemiBold" id="idA_SignUp" href="https://signup.live.com/signup.aspx?sf=1&amp;id=38936&amp;ru=https://account.live.com/%3fmkt%3dEN-CA%26lc%3d1033%26id%3d38936&amp;tw=0&amp;fs=0&amp;kv=0&amp;cb=&amp;cbcxt=&amp;wp=SAPI&amp;wa=wsignin1.0&amp;wreply=https://account.live.com/%3fmkt%3dEN-CA%26lc%3d1033%26id%3d38936&amp;bk=1418142257&amp;uiflavor=web&amp;uaid=044b77b4ae9b4935aae90dc9f8e32929&amp;mkt=EN-CA&amp;lc=4105">Sign up now</a></div></div><div class="SignUp signUpFloat" id="SignUpTD"><span>Don't have a Microsoft account?</span> <a class="TextSemiBold" id="idA_SignUp" href="https://signup.live.com/signup.aspx?sf=1&amp;id=38936&amp;ru=https://account.live.com/%3fmkt%3dEN-CA%26lc%3d1033%26id%3d38936&amp;tw=0&amp;fs=0&amp;kv=0&amp;cb=&amp;cbcxt=&amp;wp=SAPI&amp;wa=wsignin1.0&amp;wreply=https://account.live.com/%3fmkt%3dEN-CA%26lc%3d1033%26id%3d38936&amp;bk=1418142257&amp;uiflavor=web&amp;uaid=044b77b4ae9b4935aae90dc9f8e32929&amp;mkt=EN-CA&amp;lc=4105">Sign up now</a></div></div></div></div><div style="height: 50px; clear: both;"></div></div></div><div class="footerHeight" id="evDiv"><img height="0" id="ev" style="visibility: hidden;" alt=""></div><div class="footer centerParent" id="footerTD" style="clear: both;"><div class="center" style="width: 895px;"><div class="mslogo" id="idDiv_MSLogo"></div></div><div class="center" style="width: 895px; clear: both;"><table class="footer" cellspacing="0" cellpadding="0"><tbody><tr><td align="right"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="text-align: right;"><span></span></td><td class="footerspace" aria-hidden="true">&nbsp;</td><td class="footerspace" aria-hidden="true">&nbsp;</td><td style="text-align: right;"><a class="footerlink" id="ftrFdbk" href="http://login.live.com/gls.srf?urlID=WLHelpCentral&amp;mkt=EN-CA&amp;vv=1600">Contact Us</a></td><td class="footerspace" aria-hidden="true">&nbsp;</td><td class="footerspace" aria-hidden="true">&nbsp;</td><td style="text-align: right;"><a class="footerlink" id="ftrTerms" href="http://login.live.com/gls.srf?urlID=WinLiveTermsOfUse&amp;mkt=EN-CA&amp;vv=1600">Terms of Use</a></td><td class="footerspace" aria-hidden="true">&nbsp;</td><td class="footerspace" aria-hidden="true">&nbsp;</td><td style="text-align: right;"><a class="footerlink" id="ftrPrivacy" href="http://login.live.com/gls.srf?urlID=MSNPrivacyStatement&amp;mkt=EN-CA&amp;vv=1600">Privacy &amp; Cookies</a></td><td class="footerspace" aria-hidden="true">&nbsp;</td><td class="footerspace" aria-hidden="true">&nbsp;</td><td style="text-align: right;"><a class="footerlink" id="ftrLinkDisclaimer" href="http://login.live.com/gls.srf?urlID=Impressum&amp;mkt=EN-CA&amp;vv=1600">Link Disclaimer</a></td><td class="footerspace" aria-hidden="true">&nbsp;</td><td class="footerspace" aria-hidden="true">&nbsp;</td><td style="text-align: right;"><span class="secondary ltr" id="ftrCopy">©2014 Microsoft</span></td></tr></tbody></table></td></tr></tbody></table></div></div>

Test runner

Ready to run.

Testing in
TestOps/sec
querySelectorAll
var nodes = document.querySelectorAll('a')
ready
getElementsByTagName
var nodes = document.getElementsByTagName('a')
ready

Revisions

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