Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.1 Mobile/15E148 Safari/604.1
Mobile Safari 17
iOS 17.1.1
Mobile
one year ago
Test name Executions per second
Using the spread operator 4704724.5 Ops/sec
Using Object.assign 3531384.8 Ops/sec
Manually copying properties 91765240.0 Ops/sec
Create new object while copying 90846696.0 Ops/sec
Create new object from scratch 217016400.0 Ops/sec
Tests:
  • Using the spread operator

  • Using Object.assign

  • Manually copying properties

  • Create new object while copying

  • Create new object from scratch