Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Linux
Desktop
one year ago
Test name Executions per second
clientWidth / clientHeight (destructured and renamed) 28163.8 Ops/sec
clientWidth / clientHeight (destructured) 27401.9 Ops/sec
clientWidth / clientHeight (simple property access) 27847.1 Ops/sec
getBoundingClientRect() (destructured) 56742.7 Ops/sec
getBoundingClientRect() (simple property access) 57211.0 Ops/sec
getComputedStyle 18310.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)

  • getComputedStyle