Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Mac OS X 10.10
Desktop
2 years ago
Test name Executions per second
Iteration with blank object 124480.0 Ops/sec
Object.assign with blank object 172030.0 Ops/sec
Iteration with created object 101237.4 Ops/sec
Object.assign with created object 134367.1 Ops/sec
Iteration with blank object and prototype 92699.6 Ops/sec
Object.assign with blank object and prototype 131480.1 Ops/sec
Iteration with blank object and prototype prop 104437.3 Ops/sec
Object.assign with blank object and prototype prop 153164.8 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