Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Chrome 105
Windows
Desktop
one year ago
Test name Executions per second
Iteration with blank object 786015.6 Ops/sec
Object.assign with blank object 2288666.0 Ops/sec
Iteration with created object 595837.4 Ops/sec
Object.assign with created object 1259253.0 Ops/sec
Iteration with blank object and prototype 578376.8 Ops/sec
Object.assign with blank object and prototype 1159773.0 Ops/sec
Iteration with blank object and prototype prop 704312.6 Ops/sec
Object.assign with blank object and prototype prop 1752343.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