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)
2.4M/s
getBoundingClientRect() (destructured)
2.4M/s
clientWidth / clientHeight (destructured)
2.0M/s
clientWidth / clientHeight (destructured and renamed)
1.9M/s
clientWidth / clientHeight (simple property access)
1.9M/s
View exact numbers
Test name Executions per second
getBoundingClientRect() (simple property access) 2,436,576 Ops/sec
getBoundingClientRect() (destructured) 2,390,020 Ops/sec
clientWidth / clientHeight (destructured) 1,994,524 Ops/sec
clientWidth / clientHeight (destructured and renamed) 1,928,268 Ops/sec
clientWidth / clientHeight (simple property access) 1,900,294 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: