Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0
Firefox 106
Windows
Desktop
one year ago
Test name Executions per second
Iteration with blank object 2291758.2 Ops/sec
Object.assign with blank object 3065158.2 Ops/sec
Iteration with created object 2114443.2 Ops/sec
Object.assign with created object 5015118.0 Ops/sec
Iteration with blank object and prototype 1989768.5 Ops/sec
Object.assign with blank object and prototype 4157120.2 Ops/sec
Iteration with blank object and prototype prop 2027080.8 Ops/sec
Object.assign with blank object and prototype prop 4265925.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