Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 YaBrowser/18.11.1.805 Yowser/2.5 Safari/537.36
Yandex Browser 18
Windows
Desktop
5 years ago
Test name Executions per second
slice 341011.7 Ops/sec
spread operator 455460.1 Ops/sec
push apply into empty array 1193592.6 Ops/sec
Array.from 285298.1 Ops/sec
Object.values 84355.2 Ops/sec
Script Preparation code:
Tests:
  • slice

  • spread operator

  • push apply into empty array

  • Array.from

  • Object.values


;