Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.55
Chrome 99
Windows
Desktop
11 months ago
Test name Executions per second
Using the spread operator 2914567.0 Ops/sec
Using Object.assign 5858651.0 Ops/sec
Using For-In loop 58161460.0 Ops/sec
Using For-In loop with hasOwnProperty 3419821.2 Ops/sec
Tests:
  • Using the spread operator

  • Using Object.assign

  • Using For-In loop

  • Using For-In loop with hasOwnProperty