getBoundingClientRect vs offsetLeftFastest: getBoundingClientRect (1.2x faster)
1,446,498 ops/sec
1,164,197 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| getBoundingClientRect | |
| offsetLeft |
| Test name | Executions per second |
|---|---|
| ✓ getBoundingClientRect | 2,453,267 Ops/sec |
| offsetLeft | 2,176,614 Ops/sec |