Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
querySelector vs getElementsByClassName
(version: 0)
op / sec
Comparing performance of:
querySelector vs getElementsByClassName
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<footer id="ft"> <div class="inner clearfix"> <!--footer-info--> <div id="footer-info" class="clearfix"> <div id="wapper-block" class="clearfix"> <div class="block"> <p class="block-title">AGRI PICKについて</p> <ul> <li><a href="https://agripick.com/about" data-wpel-link="internal">» AGRI PICKとは</a></li> <li><a href="https://agripick.com/lists" data-wpel-link="internal">» まとめ一覧</a></li> <li><a href="https://agripick.com/tag" data-wpel-link="internal">» キーワード一覧</a></li> <li><a href="https://agripick.com/author" data-wpel-link="internal">» ライタ一一覧</a></li> <li><a href="https://agripick.com/categories" data-wpel-link="internal">» カテゴリ一覧</a></li> </ul> <ul> <li><a href="http://agri-connect.co.jp/" target="_blank" data-wpel-link="external" rel="nofollow external noopener noreferrer">» 運営会社</a></li> <li><a href="http://agri-connect.co.jp/recruit/" target="_blank" data-wpel-link="external" rel="nofollow external noopener noreferrer">» 採用情報</a></li> <li><a href="https://agripick.com/contact" data-wpel-link="internal">» お問い合わせ</a></li> <li><a href="https://agripick.com/agreement" data-wpel-link="internal">» 利用規約</a></li> <li><a href="https://agripick.com/privacy_policy" data-wpel-link="internal">» プライバシーポリシー</a></li> </ul> <!--<ul> <li></li> </ul>--> </div> <div class="block"> <p class="block-title">カテゴリ一覧</p> <ul> <li><a href="https://agripick.com/news" data-wpel-link="internal">» ニュース</a></li> <li><a href="https://agripick.com/cultivation" data-wpel-link="internal">» 栽培の知識</a></li> <li><a href="https://agripick.com/seeds-seedlings" data-wpel-link="internal">» 種・苗</a></li> <li><a href="https://agripick.com/soil" data-wpel-link="internal">» 土づくり</a></li> <li><a href="https://agripick.com/fertilizers" data-wpel-link="internal">» 肥料</a></li> <li><a href="https://agripick.com/pesticides" data-wpel-link="internal">» 農薬</a></li> <li><a href="https://agripick.com/machine" data-wpel-link="internal">» 農業機械</a></li> <li><a href="https://agripick.com/material" data-wpel-link="internal">» 農業資材</a></li> <li><a href="https://agripick.com/supplies" data-wpel-link="internal">» 園芸用品</a></li> <li><a href="https://agripick.com/work-place" data-wpel-link="internal">» 倉庫・作業場・事務所</a></li> </ul> <ul> <li><a href="https://agripick.com/home-garden" data-wpel-link="internal">» 家庭菜園</a></li> <li><a href="https://agripick.com/gardening" data-wpel-link="internal">» ガーデニング・園芸</a></li> <li><a href="https://agripick.com/diy" data-wpel-link="internal">» DIY</a></li> <li><a href="https://agripick.com/legal-tips" data-wpel-link="internal">» 農家の法務・基礎知識</a></li> <li><a href="https://agripick.com/recruit" data-wpel-link="internal">» 就職・就農・求人</a></li> <li><a href="https://agripick.com/event" data-wpel-link="internal">» イベント・レジャー</a></li> <li><a href="https://agripick.com/fashion" data-wpel-link="internal">» ファッション</a></li> <li><a href="https://agripick.com/food" data-wpel-link="internal">» 食</a></li> <li><a href="https://agripick.com/life" data-wpel-link="internal">» 暮らし</a></li> </ul> </div> </div> </div> <!--/footer-info--> <!--footer-logo--> <div id="footer-logo"> <dl> <dt><a href="https://agripick.com/" data-wpel-link="internal"><img loading="lazy" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20124%2025'%3E%3C/svg%3E" width="124" height="25" alt="農業・ガーデニング・園芸・家庭菜園マガジン[AGRI PICK]" data-lazy-src="https://agripick.com/wp-content/themes/curation-pc/img/logo.png"><noscript><img src="https://agripick.com/wp-content/themes/curation-pc/img/logo.png" width="124" height="25" alt="農業・ガーデニング・園芸・家庭菜園マガジン[AGRI PICK]"></noscript></a></dt> <dd class="desc">AGRI PICKは、農業・ガーデニング・園芸・家庭菜園Webマガジンです。</dd> <dd> <ul> <li><a href="https://www.facebook.com/AGRIPICK/" target="_blank" data-wpel-link="external" rel="nofollow external noopener noreferrer"><img loading="lazy" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2045%2045'%3E%3C/svg%3E" width="45" height="45" alt="aa" data-lazy-src="https://agripick.com/wp-content/themes/curation-pc/img/ico_fb.png"><noscript><img src="https://agripick.com/wp-content/themes/curation-pc/img/ico_fb.png" width="45" height="45" alt="aa"></noscript></a></li> </ul> </dd> <dd class="copy">© Agriconnect All Rights Reserved.</dd> </dl> </div> <!--/footer-logo--> </div> <!--footer-info--> </footer>
Tests:
querySelector
document.querySelector(".desc")
getElementsByClassName
document.getElementsByClassName("desc")
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
querySelector
getElementsByClassName
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
I'll provide an answer based on the provided input. To determine which of the two methods, `querySelector` or `getElementsByClassName`, is faster, we can compare the benchmark results. The latest benchmark result shows that: * For the test name "getElementsByClassName", there were 2.7 million executions per second. * For the test name "querySelector", there were 9.9 million executions per second. Since 9.9 million is greater than 2.7 million, it appears that `querySelector` is faster than `getElementsByClassName`.
Related benchmarks:
querySelector vs. getElementsByClassName[0]
querySelector vs getElementById vs getElementsByClassName
PAW-PruebaCreateElement vs innerHTML
DataAttribute vs Class Selector vs ID Selector vs getElementById vs getElementsByClassName with other elements
Comments
Confirm delete:
Do you really want to delete benchmark?