Run details:
Mozilla/5.0 (Linux; Android 13; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36
Chrome Mobile 105
Android
Mobile
2 years ago
Test name Executions per second
Using the spread operator 44711840.0 Ops/sec
Using Object.assign 3191787.5 Ops/sec
Manually copying properties 868221760.0 Ops/sec
Create new object while copying 935588672.0 Ops/sec
Create new object from scratch 964198400.0 Ops/sec
Tests:
  • Using the spread operator

  • Using Object.assign

  • Manually copying properties

  • Create new object while copying

  • Create new object from scratch