Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 Edg/80.0.361.48
Chrome 80
Mac OS X 10.15.2
Desktop
4 years ago
Test name Executions per second
slice 554463.8 Ops/sec
spread operator 510313.6 Ops/sec
push apply into empty array 1608106.4 Ops/sec
Array.from 361842.3 Ops/sec
Object.values 102769.0 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values