Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Chrome 136
Mac OS X 10.15.7
Desktop
one year ago
getBoundingClientRect() (simple property access)
3.1M/s
getBoundingClientRect() (destructured)
3.0M/s
clientWidth / clientHeight (destructured)
2.5M/s
clientWidth / clientHeight (destructured and renamed)
2.4M/s
clientWidth / clientHeight (simple property access)
2.3M/s
View exact numbers
Test name Executions per second
getBoundingClientRect() (simple property access) 3,131,832 Ops/sec
getBoundingClientRect() (destructured) 3,005,941 Ops/sec
clientWidth / clientHeight (destructured) 2,459,295 Ops/sec
clientWidth / clientHeight (destructured and renamed) 2,408,628 Ops/sec
clientWidth / clientHeight (simple property access) 2,273,694 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: