Script Preparation code:
Tests:
  • Array(n).fill(str)

  • Array.from({ length: n }, _ => str)

  • loop

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Array(n).fill(str)
    Array.from({ length: n }, _ => str)
    loop

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0
Firefox 135 on Linux
View result in a separate tab
Test name Executions per second
Array(n).fill(str) 238776.2 Ops/sec
Array.from({ length: n }, _ => str) 66171.8 Ops/sec
loop 97861.0 Ops/sec