Run details:
Mozilla/5.0 (Linux; Android 13; SM-S908B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36
Chrome Mobile 111
Android
Mobile
one year ago
Test name Executions per second
Array.concat 3603624.5 Ops/sec
Array.slice 3985444.0 Ops/sec
For loop 119594.2 Ops/sec
For loop with declared length 171939.9 Ops/sec
While loop 181492.3 Ops/sec
Spread operator 3753246.5 Ops/sec
Slice with begin argument 3770216.0 Ops/sec
Slice with begin and end argument 2469823.8 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