Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
slice
103.2M/s
slice(0)
98.5M/s
Push
61.6M/s
spread operator
53.8M/s
Array.prototype.concat
16.3M/s
for loop
15.7M/s
Array.from
13.7M/s
Object.assign
2.4M/s

Fastest: slice (43.7x faster)

View exact numbers
  • slice: 103,156,480 ops/sec
  • slice(0): 98,494,936 ops/sec
  • Push: 61,634,896 ops/sec
  • spread operator: 53,840,336 ops/sec
  • Array.prototype.concat: 16,327,606 ops/sec
  • for loop: 15,659,686 ops/sec
  • Array.from: 13,708,486 ops/sec
  • Object.assign: 2,360,165 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.prototype.concat
    spread operator
    Push
    Object.assign
    slice(0)
    slice
    Array.from
    for loop

    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/135.0.0.0 Safari/537.36
Chrome 135 on Mac OS X 10.15.7
View result in a separate tab
slice
107.4M/s
slice(0)
106.8M/s
Array.from
68.2M/s
Push
66.6M/s
spread operator
57.2M/s
Array.prototype.concat
16.3M/s
for loop
15.6M/s
Object.assign
3.4M/s
View exact numbers
Test name Executions per second
slice 107,355,728 Ops/sec
slice(0) 106,790,616 Ops/sec
Array.from 68,226,128 Ops/sec
Push 66,580,240 Ops/sec
spread operator 57,207,780 Ops/sec
Array.prototype.concat 16,290,284 Ops/sec
for loop 15,645,769 Ops/sec
Object.assign 3,440,688 Ops/sec