Tests:
  • Array constructor

    AخA
     
    const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    const arrayConstructor = new Array(...numbers);
  • Array literal

     
    const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    const arrayLiteral = [...numbers];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array constructor
    Array literal

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
Firefox 100 on Windows
View result in a separate tab
Test name Executions per second
Array constructor 20133280.0 Ops/sec
Array literal 10620871.0 Ops/sec