Run details:
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36 Chrome/86.0.4240.0
Chrome 86
Windows XP
Desktop
one year ago
Test name Executions per second
offsetWidth / offsetHeight (destructured and renamed) 102770.7 Ops/sec
offsetWidth / offsetHeight (destructured) 101145.8 Ops/sec
offsetWidth / offsetHeight (simple property access) 95032.5 Ops/sec
getBoundingClientRect() (destructured) 127956.6 Ops/sec
getBoundingClientRect() (simple property access) 117704.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • offsetWidth / offsetHeight (destructured and renamed)

  • offsetWidth / offsetHeight (destructured)

  • offsetWidth / offsetHeight (simple property access)

  • getBoundingClientRect() (destructured)

  • getBoundingClientRect() (simple property access)