Run details:
Mozilla/5.0 (Linux; Android 9; Redmi Note 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.115 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
3 years ago
Test name Executions per second
slice 195300.9 Ops/sec
spread operator 186182.9 Ops/sec
push apply into empty array 456564.4 Ops/sec
Array.from 171240.7 Ops/sec
Object.values 32674.7 Ops/sec
A-Push Apply reuse Array 453688.3 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values

  • A-Push Apply reuse Array