Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
Chrome 97
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Destructuring assignment (undefined) 9534364.0 Ops/sec
Optional chaining (undefined) 9369462.0 Ops/sec
Destructuring assignment (null) 975068096.0 Ops/sec
Optional chaining (null) 970975680.0 Ops/sec
Destructuring assignment (value) 976736640.0 Ops/sec
Optional chaining (value) 983287936.0 Ops/sec
Destructuring assignment (no property) 985894784.0 Ops/sec
Optional chaining (no property) 989011200.0 Ops/sec
Tests:
  • Destructuring assignment (undefined)

  • Optional chaining (undefined)

  • Destructuring assignment (null)

  • Optional chaining (null)

  • Destructuring assignment (value)

  • Optional chaining (value)

  • Destructuring assignment (no property)

  • Optional chaining (no property)


;