Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.0.0 Safari/537.36
Chrome 90
Windows
Desktop
3 years ago
Test name Executions per second
slice 572186.9 Ops/sec
spread operator 514397.0 Ops/sec
push apply into empty array 1629844.1 Ops/sec
Array.from 451590.5 Ops/sec
Object.values 88004.0 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values