Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
document.head vs document.getElementsByTagName
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/109.0.0.0 Safari/537.36
Browser:
Chrome 109
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
2
4692277.0 Ops/sec
3
3381999.2 Ops/sec
HTML Preparation code:
<html> <head id="myHead"> <title>My title</title> </head> <body><p id="demo"></p> </body> </html>
Tests:
2
var css = document.head;
3
var css = document.getElementsByTagName("head")[0];