Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
dataset vs getAttribute
(version: 0)
Comparing performance of:
loopy 1 vs loopy 2
Created:
6 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<ul class="general-tag-list"><li class="category-0" data-id="1girl"><a class="wiki-link" href="/wiki_pages/show_or_new?title=1girl">?</a> <a class="search-tag" href="/posts?tags=1girl">1girl</a> <span class="post-count" title="2554200">2554k</span></li><li class="category-0" data-id="2019"><a class="wiki-link" href="/wiki_pages/show_or_new?title=2019">?</a> <a class="search-tag" href="/posts?tags=2019">2019</a> <span class="post-count" title="1485">1.5k</span></li><li class="category-0" data-id="animal ears"><a class="wiki-link" href="/wiki_pages/show_or_new?title=animal_ears">?</a> <a class="search-tag" href="/posts?tags=animal_ears">animal ears</a> <span class="post-count" title="345966">345k</span></li><li class="category-0" data-id="bangs"><a class="wiki-link" href="/wiki_pages/show_or_new?title=bangs">?</a> <a class="search-tag" href="/posts?tags=bangs">bangs</a> <span class="post-count" title="490940">490k</span></li><li class="category-0" data-id="bare shoulders"><a class="wiki-link" href="/wiki_pages/show_or_new?title=bare_shoulders">?</a> <a class="search-tag" href="/posts?tags=bare_shoulders">bare shoulders</a> <span class="post-count" title="319677">319k</span></li><li class="category-0" data-id="bikini"><a class="wiki-link" href="/wiki_pages/show_or_new?title=bikini">?</a> <a class="search-tag" href="/posts?tags=bikini">bikini</a> <span class="post-count" title="170578">170k</span></li><li class="category-0" data-id="black bikini"><a class="wiki-link" href="/wiki_pages/show_or_new?title=black_bikini">?</a> <a class="search-tag" href="/posts?tags=black_bikini">black bikini</a> <span class="post-count" title="23040">23k</span></li><li class="category-0" data-id="blush"><a class="wiki-link" href="/wiki_pages/show_or_new?title=blush">?</a> <a class="search-tag" href="/posts?tags=blush">blush</a> <span class="post-count" title="1164760">1164k</span></li><li class="category-0" data-id="breasts"><a class="wiki-link" href="/wiki_pages/show_or_new?title=breasts">?</a> <a class="search-tag" href="/posts?tags=breasts">breasts</a> <span class="post-count" title="1224018">1224k</span></li><li class="category-0" data-id="brown eyes"><a class="wiki-link" href="/wiki_pages/show_or_new?title=brown_eyes">?</a> <a class="search-tag" href="/posts?tags=brown_eyes">brown eyes</a> <span class="post-count" title="422113">422k</span></li><li class="category-0" data-id="brown legwear"><a class="wiki-link" href="/wiki_pages/show_or_new?title=brown_legwear">?</a> <a class="search-tag" href="/posts?tags=brown_legwear">brown legwear</a> <span class="post-count" title="18266">18k</span></li><li class="category-0" data-id="bunny ears"><a class="wiki-link" href="/wiki_pages/show_or_new?title=bunny_ears">?</a> <a class="search-tag" href="/posts?tags=bunny_ears">bunny ears</a> <span class="post-count" title="73654">73k</span></li><li class="category-0" data-id="carrot hair ornament"><a class="wiki-link" href="/wiki_pages/show_or_new?title=carrot_hair_ornament">?</a> <a class="search-tag" href="/posts?tags=carrot_hair_ornament">carrot hair ornament</a> <span class="post-count" title="323">323</span></li><li class="category-0" data-id="closed mouth"><a class="wiki-link" href="/wiki_pages/show_or_new?title=closed_mouth">?</a> <a class="search-tag" href="/posts?tags=closed_mouth">closed mouth</a> <span class="post-count" title="192684">192k</span></li><li class="category-0" data-id="collarbone"><a class="wiki-link" href="/wiki_pages/show_or_new?title=collarbone">?</a> <a class="search-tag" href="/posts?tags=collarbone">collarbone</a> <span class="post-count" title="233695">233k</span></li><li class="category-0" data-id="cover"><a class="wiki-link" href="/wiki_pages/show_or_new?title=cover">?</a> <a class="search-tag" href="/posts?tags=cover">cover</a> <span class="post-count" title="40686">40k</span></li><li class="category-0" data-id="cover page"><a class="wiki-link" href="/wiki_pages/show_or_new?title=cover_page">?</a> <a class="search-tag" href="/posts?tags=cover_page">cover page</a> <span class="post-count" title="28101">28k</span></li><li class="category-0" data-id="doujin cover"><a class="wiki-link" href="/wiki_pages/show_or_new?title=doujin_cover">?</a> <a class="search-tag" href="/posts?tags=doujin_cover">doujin cover</a> <span class="post-count" title="15602">15k</span></li><li class="category-0" data-id="eyebrows visible through hair"><a class="wiki-link" href="/wiki_pages/show_or_new?title=eyebrows_visible_through_hair">?</a> <a class="search-tag" href="/posts?tags=eyebrows_visible_through_hair">eyebrows visible through hair</a> <span class="post-count" title="368902">368k</span></li><li class="category-0" data-id="finger to mouth"><a class="wiki-link" href="/wiki_pages/show_or_new?title=finger_to_mouth">?</a> <a class="search-tag" href="/posts?tags=finger_to_mouth">finger to mouth</a> <span class="post-count" title="16659">16k</span></li><li class="category-0" data-id="food themed hair ornament"><a class="wiki-link" href="/wiki_pages/show_or_new?title=food_themed_hair_ornament">?</a> <a class="search-tag" href="/posts?tags=food_themed_hair_ornament">food themed hair ornament</a> <span class="post-count" title="3340">3.3k</span></li><li class="category-0" data-id="hair ornament"><a class="wiki-link" href="/wiki_pages/show_or_new?title=hair_ornament">?</a> <a class="search-tag" href="/posts?tags=hair_ornament">hair ornament</a> <span class="post-count" title="497935">497k</span></li><li class="category-0" data-id="hood"><a class="wiki-link" href="/wiki_pages/show_or_new?title=hood">?</a> <a class="search-tag" href="/posts?tags=hood">hood</a> <span class="post-count" title="78596">78k</span></li><li class="category-0" data-id="hood down"><a class="wiki-link" href="/wiki_pages/show_or_new?title=hood_down">?</a> <a class="search-tag" href="/posts?tags=hood_down">hood down</a> <span class="post-count" title="15288">15k</span></li><li class="category-0" data-id="hooded jacket"><a class="wiki-link" href="/wiki_pages/show_or_new?title=hooded_jacket">?</a> <a class="search-tag" href="/posts?tags=hooded_jacket">hooded jacket</a> <span class="post-count" title="10996">10k</span></li><li class="category-0" data-id="jacket"><a class="wiki-link" href="/wiki_pages/show_or_new?title=jacket">?</a> <a class="search-tag" href="/posts?tags=jacket">jacket</a> <span class="post-count" title="184758">184k</span></li><li class="category-0" data-id="leaning forward"><a class="wiki-link" href="/wiki_pages/show_or_new?title=leaning_forward">?</a> <a class="search-tag" href="/posts?tags=leaning_forward">leaning forward</a> <span class="post-count" title="41463">41k</span></li><li class="category-0" data-id="long hair"><a class="wiki-link" href="/wiki_pages/show_or_new?title=long_hair">?</a> <a class="search-tag" href="/posts?tags=long_hair">long hair</a> <span class="post-count" title="1758400">1758k</span></li><li class="category-0" data-id="long sleeves"><a class="wiki-link" href="/wiki_pages/show_or_new?title=long_sleeves">?</a> <a class="search-tag" href="/posts?tags=long_sleeves">long sleeves</a> <span class="post-count" title="379939">379k</span></li><li class="category-0" data-id="micro bikini"><a class="wiki-link" href="/wiki_pages/show_or_new?title=micro_bikini">?</a> <a class="search-tag" href="/posts?tags=micro_bikini">micro bikini</a> <span class="post-count" title="15073">15k</span></li><li class="category-0" data-id="navel"><a class="wiki-link" href="/wiki_pages/show_or_new?title=navel">?</a> <a class="search-tag" href="/posts?tags=navel">navel</a> <span class="post-count" title="408802">408k</span></li><li class="category-0" data-id="off shoulder"><a class="wiki-link" href="/wiki_pages/show_or_new?title=off_shoulder">?</a> <a class="search-tag" href="/posts?tags=off_shoulder">off shoulder</a> <span class="post-count" title="60823">60k</span></li><li class="category-0" data-id="open clothes"><a class="wiki-link" href="/wiki_pages/show_or_new?title=open_clothes">?</a> <a class="search-tag" href="/posts?tags=open_clothes">open clothes</a> <span class="post-count" title="134092">134k</span></li><li class="category-0" data-id="open jacket"><a class="wiki-link" href="/wiki_pages/show_or_new?title=open_jacket">?</a> <a class="search-tag" href="/posts?tags=open_jacket">open jacket</a> <span class="post-count" title="35543">35k</span></li><li class="category-0" data-id="pink jacket"><a class="wiki-link" href="/wiki_pages/show_or_new?title=pink_jacket">?</a> <a class="search-tag" href="/posts?tags=pink_jacket">pink jacket</a> <span class="post-count" title="2519">2.5k</span></li><li class="category-0" data-id="sidelocks"><a class="wiki-link" href="/wiki_pages/show_or_new?title=sidelocks">?</a> <a class="search-tag" href="/posts?tags=sidelocks">sidelocks</a> <span class="post-count" title="139222">139k</span></li><li class="category-0" data-id="skindentation"><a class="wiki-link" href="/wiki_pages/show_or_new?title=skindentation">?</a> <a class="search-tag" href="/posts?tags=skindentation">skindentation</a> <span class="post-count" title="32167">32k</span></li><li class="category-0" data-id="sleeves past wrists"><a class="wiki-link" href="/wiki_pages/show_or_new?title=sleeves_past_wrists">?</a> <a class="search-tag" href="/posts?tags=sleeves_past_wrists">sleeves past wrists</a> <span class="post-count" title="42584">42k</span></li><li class="category-0" data-id="small breasts"><a class="wiki-link" href="/wiki_pages/show_or_new?title=small_breasts">?</a> <a class="search-tag" href="/posts?tags=small_breasts">small breasts</a> <span class="post-count" title="169864">169k</span></li><li class="category-0" data-id="smile"><a class="wiki-link" href="/wiki_pages/show_or_new?title=smile">?</a> <a class="search-tag" href="/posts?tags=smile">smile</a> <span class="post-count" title="1068436">1068k</span></li><li class="category-0" data-id="snowflakes"><a class="wiki-link" href="/wiki_pages/show_or_new?title=snowflakes">?</a> <a class="search-tag" href="/posts?tags=snowflakes">snowflakes</a> <span class="post-count" title="6299">6.3k</span></li><li class="category-0" data-id="solo"><a class="wiki-link" href="/wiki_pages/show_or_new?title=solo">?</a> <a class="search-tag" href="/posts?tags=solo">solo</a> <span class="post-count" title="2113336">2113k</span></li><li class="category-0" data-id="swimsuit"><a class="wiki-link" href="/wiki_pages/show_or_new?title=swimsuit">?</a> <a class="search-tag" href="/posts?tags=swimsuit">swimsuit</a> <span class="post-count" title="244860">244k</span></li><li class="category-0" data-id="thighhighs"><a class="wiki-link" href="/wiki_pages/show_or_new?title=thighhighs">?</a> <a class="search-tag" href="/posts?tags=thighhighs">thighhighs</a> <span class="post-count" title="573940">573k</span></li><li class="category-0" data-id="twintails"><a class="wiki-link" href="/wiki_pages/show_or_new?title=twintails">?</a> <a class="search-tag" href="/posts?tags=twintails">twintails</a> <span class="post-count" title="401717">401k</span></li><li class="category-0" data-id="very long hair"><a class="wiki-link" href="/wiki_pages/show_or_new?title=very_long_hair">?</a> <a class="search-tag" href="/posts?tags=very_long_hair">very long hair</a> <span class="post-count" title="334169">334k</span></li></ul>
Script Preparation code:
var ul = document.querySelector(`.general-tag-list`); var walker = document.createTreeWalker(ul, 1, null, false); var total = 0;
Tests:
loopy 1
for (let i = 0, n = ul.childElementCount, node = ul.firstChild; i < n; ++i, (node = node.nextElementSibling)) { total += node.dataset.id.length; }
loopy 2
for (let i = 0, n = ul.childElementCount, node = ul.firstChild; i < n; ++i, (node = node.nextElementSibling)) { total += node.getAttribute(`data-id`).length; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
loopy 1
loopy 2
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):
It appears you're trying to parse a large string containing HTML, JavaScript code snippets, and benchmarking data. I'll do my best to help. To provide an accurate answer, I need some context about what exactly you'd like me to help with. Please let me know: 1. What is the goal of this string? Is it for parsing, processing, or analyzing the data within? 2. Are there any specific parts of the string that require attention, such as extracting certain elements or values? If I can understand your requirements better, I'll provide a more focused response. Also, please note that I won't be able to execute the JavaScript code snippets or run the benchmarking tests, as they seem to rely on external dependencies and environment setup. However, I can help with: * Parsing the HTML structure * Extracting specific data or values from the string * Providing guidance on how to analyze or process the benchmarking data Please let me know how I can assist you further!
Related benchmarks:
dataset vs getAttribute speed
getAttribute('data-foo') vs dataset.foo
id vs getAttribute
id vs getAttribute pt 2
dataset vs getAttribute speed123
Comments
Confirm delete:
Do you really want to delete benchmark?