Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Chrome 68
Mac OS X 10.13.6
Desktop
6 years ago
Test name Executions per second
slice 389225.3 Ops/sec
spread operator 550614.6 Ops/sec
push apply into empty array 1293051.5 Ops/sec
Array.from 316146.5 Ops/sec
Object.values 81909.6 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values