Run details:
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
Chrome 66
Windows 8.1
Other
6 years ago
Test name Executions per second
slice 8241.7 Ops/sec
spread operator 7206.9 Ops/sec
push apply into empty array 39575.7 Ops/sec
Array.from 6020.3 Ops/sec
Object.values 1540.0 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values