Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Chrome 95
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
Iteration with blank object 842863.8 Ops/sec
Object.assign with blank object 2346454.5 Ops/sec
Iteration with created object 654013.1 Ops/sec
Object.assign with created object 1329152.0 Ops/sec
Iteration with blank object and prototype 623594.6 Ops/sec
Object.assign with blank object and prototype 1217340.6 Ops/sec
Iteration with blank object and prototype prop 751646.8 Ops/sec
Object.assign with blank object and prototype prop 1821345.2 Ops/sec
Script Preparation code:
Tests:
  • Iteration with blank object

  • Object.assign with blank object

  • Iteration with created object

  • Object.assign with created object

  • Iteration with blank object and prototype

  • Object.assign with blank object and prototype

  • Iteration with blank object and prototype prop

  • Object.assign with blank object and prototype prop