Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Mac OS X 10.15.7
Desktop
8 months ago
Test name Executions per second
Object.assign two objects 34104.9 Ops/sec
Spread two objects 26247.7 Ops/sec
Object.assign three objects 21559.8 Ops/sec
Spread three objects 18448.0 Ops/sec
Object.assign four objects 17472.6 Ops/sec
Spread four objects 12954.7 Ops/sec
Object.assign five objects 10061.9 Ops/sec
Spread five objects 10357.8 Ops/sec
Object.assign six objects 8517.8 Ops/sec
Spread six objects 8284.6 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