Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Mobile/15E148 Safari/604.1
Mobile Safari 13
iOS 13.6
Mobile
4 years ago
Test name Executions per second
slice 1386725.1 Ops/sec
spread operator 1815047.9 Ops/sec
push apply into empty array 1977764.5 Ops/sec
Array.from 1128999.6 Ops/sec
Object.values 844944.3 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values