Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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
Benchmark engine:
Benchmark.js
2
4.7M/s
3
3.4M/s
View exact numbers
Test name
Executions per second
✓
2
4,661,606 Ops/sec
3
3,383,526 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];