Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0
Firefox 135
Linux
Desktop
2 months ago
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
Script Preparation code:
Tests:
  • Array(n).fill(str)

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

  • loop