Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36 OPR/80.0.4170.61
Opera 80
Windows
Desktop
3 years ago
Test name Executions per second
Map 8.8 Ops/sec
Array.apply + Fill 0.0 Ops/sec
While Loop 7.0 Ops/sec
For Loop 6.7 Ops/sec
New Array + Fill 296.4 Ops/sec
Array Literal With Length + Fill 323.5 Ops/sec
Script Preparation code:
Tests:
  • Map

  • Array.apply + Fill

  • While Loop

  • For Loop

  • New Array + Fill

  • Array Literal With Length + Fill