Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Desktop Results:
Chrome 7 runs
Array.from
6.4M/s
Spread Syntax
6.1M/s
Array.prototype.slice
6.1M/s
Array.prototype.concat
6.0M/s
For Loop Assign
801K/s
For Loop Push
265K/s

Fastest: Array.from (24.1x faster)

View exact numbers
  • Array.from: 6,372,244 ops/sec
  • Spread Syntax: 6,073,456 ops/sec
  • Array.prototype.slice: 6,050,452 ops/sec
  • Array.prototype.concat: 5,959,004 ops/sec
  • For Loop Assign: 801,256 ops/sec
  • For Loop Push: 264,849 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.from
    Spread Syntax
    Array.prototype.slice
    Array.prototype.concat
    For Loop Push
    For Loop Assign

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 22 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome 149 on Windows
View result in a separate tab
Spread Syntax
5.4M/s
Array.prototype.slice
4.2M/s
Array.prototype.concat
3.3M/s
Array.from
2.5M/s
For Loop Assign
413K/s
For Loop Push
62K/s
View exact numbers
Test name Executions per second
Spread Syntax 5,417,269 Ops/sec
Array.prototype.slice 4,214,846 Ops/sec
Array.prototype.concat 3,265,912 Ops/sec
Array.from 2,545,347 Ops/sec
For Loop Assign 412,600 Ops/sec
For Loop Push 61,830 Ops/sec