Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Destructuring assignment (undefined) 15959742.0 Ops/sec
Optional chaining (undefined) 16339295.0 Ops/sec
Destructuring assignment (null) 1027665088.0 Ops/sec
Optional chaining (null) 1033730240.0 Ops/sec
Destructuring assignment (value) 1034807104.0 Ops/sec
Optional chaining (value) 1034011648.0 Ops/sec
Destructuring assignment (no property) 1035195264.0 Ops/sec
Optional chaining (no property) 1034668096.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)