Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Windows
Desktop
one month ago
Test name Executions per second
Object.assign two objects 18638.2 Ops/sec
Spread two objects 23473.6 Ops/sec
Object.assign three objects 9924.5 Ops/sec
Spread three objects 15741.9 Ops/sec
Object.assign four objects 6102.2 Ops/sec
Spread four objects 11258.9 Ops/sec
Object.assign five objects 4583.7 Ops/sec
Spread five objects 9318.3 Ops/sec
Object.assign six objects 3422.2 Ops/sec
Spread six objects 7263.3 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