querySelector vs getElementById

Benchmark created on


Preparation HTML

<span id="maimai-rating"></span>

Test runner

Ready to run.

Testing in
TestOps/sec
querySelector
document.querySelector("#maimai-rating")
ready
getElementById
document.getElementById("maimai-rating")
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.