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
Test name
Executions per second
1
2369475.5 Ops/sec
2
2335858.5 Ops/sec
3
715890.9 Ops/sec
4
1359024.1 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");