Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
offsetHeight vs getClientBoundingRect().height
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/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
offsetHeight
2115258.5 Ops/sec
getBoundingCientRect
1222938.4 Ops/sec
HTML Preparation code:
<div id="el"> <h2>Lorem ipsum dolor sit amet</h2> </div>
Script Preparation code:
var el = document.getElementById("el");
Tests:
offsetHeight
const height = el.offsetHeight; const perim = height * 2;
getBoundingCientRect
const rect = el.getBoundingClientRect(); const height = rect.height; const perim = height * 2;