Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
DataAttribute vs Class Selector vs ID Selector / JQuery
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/130.0.6723.90 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 130
Operating system:
iOS 18.1
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Class
2163873.8 Ops/sec
ID
4278410.5 Ops/sec
data attribute
1381483.2 Ops/sec
HTML Preparation code:
<div class="hello" id="hello" data-hello>Hello</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js'></script>
Tests:
Class
$('.hello');
ID
$('#hello');
data attribute
$('[data-hello]');