Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
2 years ago
getBoundingClientRect() (simple property access)
516K/s
getBoundingClientRect() (destructured)
494K/s
offsetWidth / offsetHeight (simple property access)
355K/s
offsetWidth / offsetHeight (destructured)
351K/s
offsetWidth / offsetHeight (destructured and renamed)
334K/s
View exact numbers
Test name Executions per second
getBoundingClientRect() (simple property access) 515,987 Ops/sec
getBoundingClientRect() (destructured) 494,373 Ops/sec
offsetWidth / offsetHeight (simple property access) 355,186 Ops/sec
offsetWidth / offsetHeight (destructured) 351,064 Ops/sec
offsetWidth / offsetHeight (destructured and renamed) 333,716 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: