getBoundingClientRect vs window.getComputedStyle + new WebKitCSSMatrixFastest: getBoundingClientRect (1.9x faster)
1,092,122 ops/sec
577,204 ops/sec
Fastest: getBoundingClientRect (3.0x faster)
1,732,822 ops/sec
572,462 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| getBoundingClientRect | |
| window.getComputedStyle + new WebKitCSSMatrix |
| Test name | Executions per second |
|---|---|
| ✓ getBoundingClientRect | 1,732,822 Ops/sec |
| window.getComputedStyle + new WebKitCSSMatrix | 572,462 Ops/sec |