Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
Chrome 83
Mac OS X 10.15.4
Desktop
4 years ago
Test name Executions per second
Iteration with blank object 735723.7 Ops/sec
Object.assign with blank object 2020699.0 Ops/sec
Iteration with created object 579814.3 Ops/sec
Object.assign with created object 1141436.2 Ops/sec
Iteration with blank object and prototype 543407.0 Ops/sec
Object.assign with blank object and prototype 1030552.8 Ops/sec
Iteration with blank object and prototype prop 629507.9 Ops/sec
Object.assign with blank object and prototype prop 1546372.8 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