Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/25.0 Chrome/121.0.0.0 Mobile Safari/537.36
Chrome Mobile 121
Android
Mobile
5 months ago
Test name Executions per second
Array.concat 1090784.4 Ops/sec
Array.slice 210663.2 Ops/sec
For loop 78773.3 Ops/sec
For loop with declared length 100025.0 Ops/sec
While loop 100049.7 Ops/sec
Spread operator 2131906.0 Ops/sec
Slice with begin argument 206832.4 Ops/sec
Slice with begin and end argument 173716.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