Tests:
  • 1️⃣ Array.from()

  • 2️⃣ Array() and map()

  • 3️⃣ for loop

  • 4️⃣ while loop

  • 5️⃣ do while loop

  • 6️⃣ for of loop

  • 7️⃣ ... spread operator, Array() and map()

  • 8️⃣ Array() and fill()

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    1️⃣ Array.from()
    2️⃣ Array() and map()
    3️⃣ for loop
    4️⃣ while loop
    5️⃣ do while loop
    6️⃣ for of loop
    7️⃣ ... spread operator, Array() and map()
    8️⃣ Array() and fill()

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106 on Mac OS X 10.14.3
View result in a separate tab
Test name Executions per second
1️⃣ Array.from() 551634.3 Ops/sec
2️⃣ Array() and map() 1577365.0 Ops/sec
3️⃣ for loop 11605400.0 Ops/sec
4️⃣ while loop 13395870.0 Ops/sec
5️⃣ do while loop 10653700.0 Ops/sec
6️⃣ for of loop 2590715.0 Ops/sec
7️⃣ ... spread operator, Array() and map() 2525534.0 Ops/sec
8️⃣ Array() and fill() 2613170.0 Ops/sec