Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Mac OS X 10.15.7
Desktop
one year ago
getBoundingClientRect() (simple property access)
1.8M/s
getBoundingClientRect() (destructured)
1.8M/s
clientWidth / clientHeight (destructured)
1.4M/s
clientWidth / clientHeight (destructured and renamed)
1.4M/s
clientWidth / clientHeight (simple property access)
1.3M/s
View exact numbers
Test name Executions per second
getBoundingClientRect() (simple property access) 1,813,219 Ops/sec
getBoundingClientRect() (destructured) 1,765,839 Ops/sec
clientWidth / clientHeight (destructured) 1,435,882 Ops/sec
clientWidth / clientHeight (destructured and renamed) 1,389,572 Ops/sec
clientWidth / clientHeight (simple property access) 1,344,323 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: