Script Preparation code:
Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    [...Array(n).keys()].map(filler)
    Array.apply(null, { length: 4 }).map(filler)
    Array.from
    Array(n).fill(undefined).map(filler)
    for loop push

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Firefox 133 on Linux
View result in a separate tab
for loop push
436/s
Array.from
357/s
Array(n).fill(undefined).map(filler)
141/s
[...Array(n).keys()].map(filler)
112/s
Array.apply(null, { length: 4 }).map(filler)
69/s
View exact numbers
Test name Executions per second
for loop push 436 Ops/sec
Array.from 357 Ops/sec
Array(n).fill(undefined).map(filler) 141 Ops/sec
[...Array(n).keys()].map(filler) 112 Ops/sec
Array.apply(null, { length: 4 }).map(filler) 69 Ops/sec