getComputedStyle vs getBoundingClientRect vs clientHeightFastest: clientHeight (2.3x faster)
286 ops/sec
191 ops/sec
122 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| getComputedStyle | |
| getBoundingClientRect | |
| clientHeight |
| Test name | Executions per second |
|---|---|
| ✓ clientHeight | 1,784 Ops/sec |
| getBoundingClientRect | 895 Ops/sec |
| getComputedStyle | 503 Ops/sec |