Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 YaBrowser/16.9.0.2765 Safari/537.36
Yandex Browser 16
Mac OS X 10.11.6
Other
8 years ago
Test name Executions per second
spreadArray by ertema 381912.4 Ops/sec
spreadArray by kbakba 323799.6 Ops/sec
spreadArray with comparsion and concat 40232.4 Ops/sec
spreadArray with concat only 26386.5 Ops/sec
spreadArray with comparsion only 446393.4 Ops/sec
spreadArrayWithoutComparsionPop 434272.9 Ops/sec
spreadArrayWithoutComparsionSlice 351741.4 Ops/sec
Script Preparation code:
Tests:
  • ComparisonAndConcat

  • Concat

  • Comparison

  • Pop

  • Shift

  • Slice

  • TailSlice

  • Slice2

  • For

  • ForReverse

  • ForComparison

  • ForWithInit

  • ForEach