Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
id vs attribute
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0
Browser:
Firefox 150
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
12 days ago
Test name
Executions per second
beginning with attribute selector
2605606.8 Ops/sec
attribute selector
2769202.2 Ops/sec
id selector
3313027.2 Ops/sec
HTML Preparation code:
<div id="variableContainerSso"></div>
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
beginning with attribute selector
document.querySelector("div[id^='variableContainerSso']")
attribute selector
document.querySelector("div[id='variableContainerSso']")
id selector
document.querySelector("#variableContainerSso")