Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
window.getComputedStyle vs. offsetTop
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.6045.193 Mobile DuckDuckGo/5 Safari/537.36
Browser:
Chrome Mobile 119
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
getComputedStyle
199.6 Ops/sec
offsetTop
32.4 Ops/sec
HTML Preparation code:
<div id="foo"></div>
Tests:
getComputedStyle
var i = 3000; while (i--) { chekele('foo'); } function chekele(element) { return window.getComputedStyle(document.getElementById(element)); }
offsetTop
var i = 3000; while (i--) { chekele('foo'); } function chekele(element) { return document.getElementById(element).offsetTop; }