Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36
Chrome Mobile 117
Android
Mobile
one year ago
Test name Executions per second
Using the spread operator 9483368.0 Ops/sec
Using Object.assign 1060156.1 Ops/sec
Manually copying properties 240064448.0 Ops/sec
Create new object while copying 250958608.0 Ops/sec
Create new object from scratch 425889440.0 Ops/sec
Tests:
  • Using the spread operator

  • Using Object.assign

  • Manually copying properties

  • Create new object while copying

  • Create new object from scratch