Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15
Safari 14
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
slice 2047523.9 Ops/sec
spread operator 2966675.0 Ops/sec
push apply into empty array 3068642.2 Ops/sec
Array.from 2154480.8 Ops/sec
Object.values 1505526.5 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values