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 2389027.5 Ops/sec
Array.slice 2161545.8 Ops/sec
For loop 63111.4 Ops/sec
For loop with declared length 87453.3 Ops/sec
While loop 92879.5 Ops/sec
Spread operator 1869789.9 Ops/sec
Slice with begin argument 2367023.2 Ops/sec
Slice with begin and end argument 1864217.0 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