HTML Preparation code:
Tests:

Historical Performance Data aggregated from 36 community runs

Desktop Results:
Chrome 29 runs
clientHeight
1.5M/s
offsetHeight
1.4M/s
getBoundingClientRect
1.0M/s

Fastest: clientHeight (1.5x faster)

View exact numbers
  • clientHeight: 1,536,248 ops/sec
  • offsetHeight: 1,388,297 ops/sec
  • getBoundingClientRect: 1,035,856 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/150.0.0.0 Safari/537.36
Chrome 150 on Windows
View result in a separate tab
offsetHeight
1.3M/s
clientHeight
1.2M/s
getBoundingClientRect
927K/s
View exact numbers
Test name Executions per second
offsetHeight 1,314,819 Ops/sec
clientHeight 1,240,956 Ops/sec
getBoundingClientRect 927,118 Ops/sec