HTML Preparation code:
Tests:

Historical Performance Data aggregated from 37 community runs

Desktop Results:
Chrome 30 runs
clientHeight
1.6M/s
offsetHeight
1.5M/s
getBoundingClientRect
1.0M/s

Fastest: clientHeight (1.5x faster)

View exact numbers
  • clientHeight: 1,613,625 ops/sec
  • offsetHeight: 1,477,156 ops/sec
  • getBoundingClientRect: 1,046,514 ops/sec
Firefox 7 runs
clientHeight
4.7M/s
offsetHeight
4.2M/s
getBoundingClientRect
2.3M/s

Fastest: clientHeight (2.0x faster)

View exact numbers
  • clientHeight: 4,658,453 ops/sec
  • offsetHeight: 4,249,774 ops/sec
  • getBoundingClientRect: 2,323,792 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    clientHeight
    offsetHeight
    getBoundingClientRect

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0
Chrome 151 on Windows
View result in a separate tab
offsetHeight
2.2M/s
clientHeight
2.1M/s
getBoundingClientRect
1.5M/s
View exact numbers
Test name Executions per second
offsetHeight 2,173,186 Ops/sec
clientHeight 2,064,803 Ops/sec
getBoundingClientRect 1,508,805 Ops/sec