Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0
Firefox 96
Linux
Desktop
2 years ago
Test name Executions per second
Iteration with blank object 1150392.2 Ops/sec
Object.assign with blank object 2156827.0 Ops/sec
Iteration with created object 1090685.5 Ops/sec
Object.assign with created object 2108664.8 Ops/sec
Iteration with blank object and prototype 1018337.4 Ops/sec
Object.assign with blank object and prototype 1888993.4 Ops/sec
Iteration with blank object and prototype prop 1017088.0 Ops/sec
Object.assign with blank object and prototype prop 1894543.5 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