Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Linux
Desktop
8 months ago
Test name Executions per second
Using the spread operator 22143972.0 Ops/sec
Using Object.assign 3239792.5 Ops/sec
Manually copying properties 58082556.0 Ops/sec
Create new object while copying 55810280.0 Ops/sec
Create new object from scratch 60712768.0 Ops/sec
Tests:
  • Using the spread operator

  • Using Object.assign

  • Manually copying properties

  • Create new object while copying

  • Create new object from scratch