Script Preparation code:
Tests:
  • Get copy using Object.assign

  • Get copy using spread

  • Get copy using structuredClone

  • Copy manually using for loop

  • Copy using JSON.stringify

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Get copy using Object.assign
    Get copy using spread
    Get copy using structuredClone
    Copy manually using for loop
    Copy using JSON.stringify

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 14 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0
Chrome 130 on Windows
View result in a separate tab
Test name Executions per second
Get copy using Object.assign 1143950.1 Ops/sec
Get copy using spread 9728743.0 Ops/sec
Get copy using structuredClone 160712.1 Ops/sec
Copy manually using for loop 484449.8 Ops/sec
Copy using JSON.stringify 176001.1 Ops/sec