Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
slice 1378213.5 Ops/sec
spread operator 1199720.5 Ops/sec
push apply into empty array 3463857.0 Ops/sec
Array.from 1027839.0 Ops/sec
Object.values 234703.9 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values