Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/123.0.6312.52 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 123
iOS 17.4
Mobile
2 years ago
clientWidth / clientHeight (destructured and renamed)
8.4M/s
clientWidth / clientHeight (destructured)
8.2M/s
clientWidth / clientHeight (simple property access)
6.6M/s
getBoundingClientRect() (destructured)
4.2M/s
getBoundingClientRect() (simple property access)
2.6M/s
View exact numbers
Test name Executions per second
clientWidth / clientHeight (destructured and renamed) 8,424,542 Ops/sec
clientWidth / clientHeight (destructured) 8,197,593 Ops/sec
clientWidth / clientHeight (simple property access) 6,626,946 Ops/sec
getBoundingClientRect() (destructured) 4,164,584 Ops/sec
getBoundingClientRect() (simple property access) 2,631,306 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: