Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129
Mac OS X 10.15.7
Desktop
one year ago
getBoundingClientRect() (simple property access)
1.6M/s
getBoundingClientRect() (destructured)
1.6M/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,585,340 Ops/sec
getBoundingClientRect() (destructured) 1,569,833 Ops/sec
clientWidth / clientHeight (destructured) 1,406,428 Ops/sec
clientWidth / clientHeight (destructured and renamed) 1,400,642 Ops/sec
clientWidth / clientHeight (simple property access) 1,274,315 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: