Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
3 months ago
Test name Executions per second
Iteration with blank object 857257.9 Ops/sec
Object.assign with blank object 2311630.0 Ops/sec
Iteration with created object 662647.1 Ops/sec
Object.assign with created object 1338702.0 Ops/sec
Iteration with blank object and prototype 639820.2 Ops/sec
Object.assign with blank object and prototype 1236175.0 Ops/sec
Iteration with blank object and prototype prop 724507.6 Ops/sec
Object.assign with blank object and prototype prop 1597629.0 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