Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36
Chrome 98
Linux
Desktop
2 years ago
Test name Executions per second
Iteration with blank object 834616.8 Ops/sec
Object.assign with blank object 2201568.5 Ops/sec
Iteration with created object 632789.6 Ops/sec
Object.assign with created object 1277969.5 Ops/sec
Iteration with blank object and prototype 629423.2 Ops/sec
Object.assign with blank object and prototype 1186001.4 Ops/sec
Iteration with blank object and prototype prop 756322.2 Ops/sec
Object.assign with blank object and prototype prop 1797883.9 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