HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 21 community runs

Desktop Results:
Chrome 15 runs
scrollHeight
1.7M/s
getBoundingClientRect().height
1.3M/s

Fastest: scrollHeight (1.3x faster)

View exact numbers
  • scrollHeight: 1,659,170 ops/sec
  • getBoundingClientRect().height: 1,266,236 ops/sec
Firefox 6 runs
scrollHeight
10.9M/s
getBoundingClientRect().height
4.1M/s

Fastest: scrollHeight (2.7x faster)

View exact numbers
  • scrollHeight: 10,864,296 ops/sec
  • getBoundingClientRect().height: 4,054,074 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
    scrollHeight
    getBoundingClientRect().height

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:139.0) Gecko/20100101 Firefox/139.0
Firefox 139 on Windows
View result in a separate tab
scrollHeight
6.6M/s
getBoundingClientRect().height
3.6M/s
View exact numbers
Test name Executions per second
scrollHeight 6,592,304 Ops/sec
getBoundingClientRect().height 3,575,261 Ops/sec