Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Linux
Desktop
10 months ago
Test name Executions per second
spread 22409226.0 Ops/sec
for loop 53141388.0 Ops/sec
for loop (array push) 67810976.0 Ops/sec
slice 42445344.0 Ops/sec
Array.from 15778835.0 Ops/sec
Script Preparation code:
Tests:
  • spread

  • for loop

  • for loop (array push)

  • slice

  • Array.from