HTML Preparation code:
Tests:

Historical Performance Data aggregated from 69 community runs

Desktop Results:
Chrome 62 runs
innerWidth
2.7M/s
clientWidth
1.7M/s
matchMedia
657K/s

Fastest: innerWidth (4.1x faster)

View exact numbers
  • innerWidth: 2,675,787 ops/sec
  • clientWidth: 1,730,468 ops/sec
  • matchMedia: 657,201 ops/sec
Firefox 7 runs
innerWidth
8.2M/s
clientWidth
6.6M/s
matchMedia
1.2M/s

Fastest: innerWidth (7.0x faster)

View exact numbers
  • innerWidth: 8,241,021 ops/sec
  • clientWidth: 6,630,034 ops/sec
  • matchMedia: 1,171,019 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
    matchMedia
    innerWidth

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Chrome 145 on Mac OS X 10.15.7
View result in a separate tab
innerWidth
5.3M/s
clientWidth
3.3M/s
matchMedia
752K/s
View exact numbers
Test name Executions per second
innerWidth 5,319,714 Ops/sec
clientWidth 3,335,460 Ops/sec
matchMedia 751,677 Ops/sec