Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/100.0.4896.77 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 100
iOS 15.3
Mobile
3 years ago
Test name Executions per second
clientWidth / clientHeight (destructured and renamed) 2746749.8 Ops/sec
clientWidth / clientHeight (destructured) 2519693.5 Ops/sec
clientWidth / clientHeight (simple property access) 2195618.5 Ops/sec
getBoundingClientRect() (destructured) 1478200.8 Ops/sec
getBoundingClientRect() (simple property access) 1327159.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • clientWidth / clientHeight (destructured and renamed)

  • clientWidth / clientHeight (destructured)

  • clientWidth / clientHeight (simple property access)

  • getBoundingClientRect() (destructured)

  • getBoundingClientRect() (simple property access)