Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
Firefox 94
Ubuntu
Desktop
3 years ago
Test name Executions per second
Array.concat 2741421.8 Ops/sec
Array.slice 13558748.0 Ops/sec
For loop 2436839.0 Ops/sec
For loop with declared length 2893529.8 Ops/sec
While loop 2739523.2 Ops/sec
Spread operator 2172001.0 Ops/sec
Slice with begin argument 13160020.0 Ops/sec
Slice with begin and end argument 13894270.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