Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/26.0 Chrome/122.0.0.0 Mobile Safari/537.36
Chrome Mobile 122
Android
Mobile
one month ago
Test name Executions per second
Using the spread operator 15894050.0 Ops/sec
Using Object.assign 2049923.8 Ops/sec
Manually copying properties 51962200.0 Ops/sec
Create new object while copying 47449308.0 Ops/sec
Create new object from scratch 53333028.0 Ops/sec
Tests:
  • Using the spread operator

  • Using Object.assign

  • Manually copying properties

  • Create new object while copying

  • Create new object from scratch