Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
element matches
(version: 0)
check performance of various query selector strings
Comparing performance of:
class on target element vs data on target element vs data nested star
Created:
2 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<main data-bench-container="true"><article data-bench-ignore="true"><header><hgroup class="attribution"><h1>Title</h1><h2 data-bench-ignore="true">Subtitle</h2></hgroup></header></article></main>
Script Preparation code:
const h1 = document.querySelector('h1'); const h2 = document.querySelector('h2'); const hgroup = document.querySelector('hgroup'); const main = document.querySelector('main'); const article = document.querySelector('article');
Tests:
class on target element
hgroup.matches('.attribution');
data on target element
h2.matches('*[data-bench-ignore], *[data-bench-ignore] *');
data nested star
h1.matches('*[data-bench-ignore], *[data-bench-ignore] *');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
class on target element
data on target element
data nested star
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!
Comments
Confirm delete:
Do you really want to delete benchmark?