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:123.0) Gecko/20100101 Firefox/123.0
Browser:
Firefox 123
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
getBoundingClientRect
2.4M/s
window.getComputedStyle + new WebKitCSSMatrix
842K/s
View exact numbers
Test name
Executions per second
✓
getBoundingClientRect
2,352,516 Ops/sec
window.getComputedStyle + new WebKitCSSMatrix
841,540 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;