HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 33 community runs

Desktop Results:
Chrome 26 runs
offsetwidth
8.7M/s
clientWidth
1.1M/s
window.getComputedStyle
575K/s

Fastest: offsetwidth (15.0x faster)

View exact numbers
  • offsetwidth: 8,653,002 ops/sec
  • clientWidth: 1,096,475 ops/sec
  • window.getComputedStyle: 575,297 ops/sec
Firefox 7 runs
offsetwidth
5.2M/s
clientWidth
3.5M/s
window.getComputedStyle
2.2M/s

Fastest: offsetwidth (2.3x faster)

View exact numbers
  • offsetwidth: 5,157,514 ops/sec
  • clientWidth: 3,455,804 ops/sec
  • window.getComputedStyle: 2,213,740 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
    clientWidth
    offsetwidth
    window.getComputedStyle

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 months ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36
Chrome Mobile 141 on Android
View result in a separate tab
offsetwidth
10.9M/s
clientWidth
160K/s
window.getComputedStyle
91K/s
View exact numbers
Test name Executions per second
offsetwidth 10,946,994 Ops/sec
clientWidth 160,427 Ops/sec
window.getComputedStyle 90,757 Ops/sec