Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
getBoundingClientRect vs window.getComputedStyle + new WebKitCSSMatrix
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0
Browser:
Firefox 151
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 months ago
Benchmark engine:
Benchmark.js
getBoundingClientRect
1.7M/s
window.getComputedStyle + new WebKitCSSMatrix
572K/s
View exact numbers
Test name
Executions per second
✓
getBoundingClientRect
1,732,822 Ops/sec
window.getComputedStyle + new WebKitCSSMatrix
572,462 Ops/sec
HTML Preparation code:
<div id="test"></div>
Tests:
getBoundingClientRect
let element = document.getElementById('test'); let rect = element.getBoundingClientRect(); let left = rect.left;
window.getComputedStyle + new WebKitCSSMatrix
let element = document.getElementById('test'); let style = window.getComputedStyle(element); let matrix = new WebKitCSSMatrix(style.transform); let left = matrix.m41;