Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
querySelector3
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser:
Chrome 121
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
1
2.4M/s
2
2.3M/s
4
1.4M/s
3
716K/s
View exact numbers
Test name
Executions per second
✓
1
2,369,476 Ops/sec
2
2,335,858 Ops/sec
4
1,359,024 Ops/sec
3
715,891 Ops/sec
HTML Preparation code:
<div id="test">12345</div>
Script Preparation code:
var D = document; function A(V){ return document.querySelector(V); } function B(V){ return D.querySelector(V); }
Tests:
1
const X = document.querySelector("#A");
2
const X = D.querySelector("#A");
3
const Z = A("#A");
4
const Z = B("#A");