Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Mac OS X 10.15.7
Desktop
one year ago
getBoundingClientRect() (simple property access)
2.7M/s
getBoundingClientRect() (destructured)
2.4M/s
clientWidth / clientHeight (destructured)
1.7M/s
clientWidth / clientHeight (simple property access)
1.6M/s
clientWidth / clientHeight (destructured and renamed)
1.6M/s
View exact numbers
Test name Executions per second
getBoundingClientRect() (simple property access) 2,713,957 Ops/sec
getBoundingClientRect() (destructured) 2,406,820 Ops/sec
clientWidth / clientHeight (destructured) 1,732,151 Ops/sec
clientWidth / clientHeight (simple property access) 1,607,994 Ops/sec
clientWidth / clientHeight (destructured and renamed) 1,594,510 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: