Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Chrome 113
Windows
Desktop
one year ago
Test name Executions per second
clientWidth / clientHeight (destructured and renamed) 604108.9 Ops/sec
clientWidth / clientHeight (destructured) 619289.3 Ops/sec
clientWidth / clientHeight (simple property access) 625176.4 Ops/sec
getBoundingClientRect() (destructured) 841923.3 Ops/sec
getBoundingClientRect() (simple property access) 863634.6 Ops/sec
getComputedStyle 320739.2 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)

  • getComputedStyle