Script Preparation code:
Tests:
  • Create a copy using the spread operator

  • Create a copy using array.concat

  • Create a copy manually in a loop using push

  • Create a copy manually in a loop by index

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Create a copy using the spread operator
    Create a copy using array.concat
    Create a copy manually in a loop using push
    Create a copy manually in a loop by index

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month 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
Create a copy using the spread operator 6546440.0 Ops/sec
Create a copy using array.concat 1745822.6 Ops/sec
Create a copy manually in a loop using push 147850.8 Ops/sec
Create a copy manually in a loop by index 161804.0 Ops/sec