Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Windows
Desktop
one year ago
Test name Executions per second
spread 11166910.0 Ops/sec
for loop 996656.6 Ops/sec
for loop (array push) 977115.8 Ops/sec
slice 10426196.0 Ops/sec
Array.from 4590556.5 Ops/sec
Script Preparation code:
Tests:
  • spread

  • for loop

  • for loop (array push)

  • slice

  • Array.from