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
Chrome 137
Mac OS X 10.15.7
Desktop
one year ago
getBoundingClientRect() (simple property access)
1.8M/s
getBoundingClientRect() (destructured)
1.7M/s
clientWidth / clientHeight (simple property access)
1.5M/s
clientWidth / clientHeight (destructured)
1.5M/s
clientWidth / clientHeight (destructured and renamed)
1.5M/s
View exact numbers
Test name Executions per second
getBoundingClientRect() (simple property access) 1,769,239 Ops/sec
getBoundingClientRect() (destructured) 1,734,936 Ops/sec
clientWidth / clientHeight (simple property access) 1,483,762 Ops/sec
clientWidth / clientHeight (destructured) 1,475,392 Ops/sec
clientWidth / clientHeight (destructured and renamed) 1,464,124 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: