Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
Chrome 92
Linux
Desktop
3 years ago
Test name Executions per second
slice 763722.0 Ops/sec
spread operator 797895.1 Ops/sec
push apply into empty array 2079265.1 Ops/sec
Array.from 519930.0 Ops/sec
Object.values 120927.5 Ops/sec
A-Push Apply reuse Array 2057199.5 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values

  • A-Push Apply reuse Array