Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Mac OS X 10.15.7
Desktop
9 days ago
Test name Executions per second
Object.assign two objects 49529.8 Ops/sec
Spread two objects 76545.5 Ops/sec
Object.assign three objects 25315.6 Ops/sec
Spread three objects 49323.7 Ops/sec
Object.assign four objects 18334.7 Ops/sec
Spread four objects 35856.0 Ops/sec
Object.assign five objects 17550.1 Ops/sec
Spread five objects 27996.1 Ops/sec
Object.assign six objects 10915.2 Ops/sec
Spread six objects 22891.2 Ops/sec
Script Preparation code:
Tests:
  • Object.assign two objects

  • Spread two objects

  • Object.assign three objects

  • Spread three objects

  • Object.assign four objects

  • Spread four objects

  • Object.assign five objects

  • Spread five objects

  • Object.assign six objects

  • Spread six objects