Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Windows
Desktop
10 months ago
Test name Executions per second
Array.concat 2590985.2 Ops/sec
Array.slice 2227980.8 Ops/sec
For loop 62936.4 Ops/sec
For loop with declared length 94549.3 Ops/sec
While loop 84034.0 Ops/sec
Spread operator 1746365.1 Ops/sec
Slice with begin argument 1826680.8 Ops/sec
Slice with begin and end argument 1578621.4 Ops/sec
Script Preparation code:
Tests:
  • Array.concat

  • Array.slice

  • For loop

  • For loop with declared length

  • While loop

  • Spread operator

  • Slice with begin argument

  • Slice with begin and end argument