HTML Preparation code:
Tests:

Historical Performance Data aggregated from 43 community runs

Desktop Results:
Chrome 34 runs
getComputedStyle
789/s
clientheight
567/s
getBoundingClientRect
380/s

Fastest: getComputedStyle (2.1x faster)

View exact numbers
  • getComputedStyle: 789 ops/sec
  • clientheight: 567 ops/sec
  • getBoundingClientRect: 380 ops/sec
Firefox 9 runs
clientheight
1K/s
getBoundingClientRect
652/s
getComputedStyle
425/s

Fastest: clientheight (2.9x faster)

View exact numbers
  • clientheight: 1,233 ops/sec
  • getBoundingClientRect: 652 ops/sec
  • getComputedStyle: 425 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
    getComputedStyle
    getBoundingClientRect
    clientheight

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Chrome 145 on Windows
View result in a separate tab
getComputedStyle
468/s
clientheight
309/s
getBoundingClientRect
207/s
View exact numbers
Test name Executions per second
getComputedStyle 468 Ops/sec
clientheight 309 Ops/sec
getBoundingClientRect 207 Ops/sec