Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Chrome 91
Mac OS X 10.14.6
Desktop
3 years ago
Test name Executions per second
slice 518117.2 Ops/sec
spread operator 483817.9 Ops/sec
push apply into empty array 1525533.2 Ops/sec
Array.from 425498.9 Ops/sec
Object.values 75788.3 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values