Script Preparation code:
Tests:

Historical Performance Data aggregated from 12 community runs

Desktop Results:
Chrome 12 runs
Array clone with slice
22.1M/s
Array clone with spread operator
18.9M/s
Array addition with spread operator
8.3M/s
Array addition with slice and push
8.0M/s

Fastest: Array clone with slice (2.8x faster)

View exact numbers
  • Array clone with slice: 22,091,468 ops/sec
  • Array clone with spread operator: 18,854,642 ops/sec
  • Array addition with spread operator: 8,286,806 ops/sec
  • Array addition with slice and push: 8,026,793 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Array clone with spread operator
    Array clone with slice
    Array addition with spread operator
    Array addition with slice and push

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Chrome 136 on Mac OS X 10.15.7
View result in a separate tab
Array clone with slice
120.2M/s
Array addition with slice and push
28.0M/s
Array clone with spread operator
24.6M/s
Array addition with spread operator
21.3M/s
View exact numbers
Test name Executions per second
Array clone with slice 120,219,936 Ops/sec
Array addition with slice and push 27,965,924 Ops/sec
Array clone with spread operator 24,595,358 Ops/sec
Array addition with spread operator 21,257,896 Ops/sec