Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/130.0.6723.90 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 130
iOS 18.0
Mobile
one month ago
Test name Executions per second
Using the spread operator 34842556.0 Ops/sec
Using Object.assign 13842471.0 Ops/sec
Manually copying properties 238682704.0 Ops/sec
Create new object while copying 234094592.0 Ops/sec
Create new object from scratch 457030880.0 Ops/sec
Tests:
  • Using the spread operator

  • Using Object.assign

  • Manually copying properties

  • Create new object while copying

  • Create new object from scratch