Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36
Chrome Mobile 130
Android
Mobile
2 days ago
Test name Executions per second
Array.concat 4649053.5 Ops/sec
Array.slice 4734883.0 Ops/sec
For loop 141941.6 Ops/sec
For loop with declared length 216816.4 Ops/sec
While loop 227307.5 Ops/sec
Spread operator 4433834.5 Ops/sec
Slice with begin argument 4698655.5 Ops/sec
Slice with begin and end argument 2841522.0 Ops/sec
Array.from 3519931.5 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

  • Array.from


;