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 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0
Browser:
Firefox 130
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
getBoundingClientRect
3.3M/s
window.getComputedStyle + new WebKitCSSMatrix
1.3M/s
View exact numbers
Test name
Executions per second
✓
getBoundingClientRect
3,304,568 Ops/sec
window.getComputedStyle + new WebKitCSSMatrix
1,250,723 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;