Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0
Firefox 72
Mac OS X 10.15
Desktop
4 years ago
Test name Executions per second
Iteration with blank object 850407.4 Ops/sec
Object.assign with blank object 1485641.0 Ops/sec
Iteration with created object 841475.2 Ops/sec
Object.assign with created object 1360295.0 Ops/sec
Iteration with blank object and prototype 786149.9 Ops/sec
Object.assign with blank object and prototype 1179181.4 Ops/sec
Iteration with blank object and prototype prop 780472.4 Ops/sec
Object.assign with blank object and prototype prop 1199636.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