Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0
Chrome 137
Mac OS X 10.15.7
Desktop
one year ago
getBoundingClientRect() (destructured)
2.1M/s
getBoundingClientRect() (simple property access)
2.1M/s
clientWidth / clientHeight (simple property access)
1.7M/s
clientWidth / clientHeight (destructured)
1.6M/s
clientWidth / clientHeight (destructured and renamed)
1.6M/s
View exact numbers
Test name Executions per second
getBoundingClientRect() (destructured) 2,133,401 Ops/sec
getBoundingClientRect() (simple property access) 2,129,015 Ops/sec
clientWidth / clientHeight (simple property access) 1,666,247 Ops/sec
clientWidth / clientHeight (destructured) 1,616,727 Ops/sec
clientWidth / clientHeight (destructured and renamed) 1,566,352 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: