Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Iteration with blank object 984524.1 Ops/sec
Object.assign with blank object 2377620.2 Ops/sec
Iteration with created object 788944.1 Ops/sec
Object.assign with created object 1557884.5 Ops/sec
Iteration with blank object and prototype 769080.7 Ops/sec
Object.assign with blank object and prototype 1470438.8 Ops/sec
Iteration with blank object and prototype prop 917258.4 Ops/sec
Object.assign with blank object and prototype prop 2143846.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