Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129
Windows
Desktop
2 months ago
Test name Executions per second
Array.concat 3802212.5 Ops/sec
Array.slice 4529125.0 Ops/sec
For loop 126460.6 Ops/sec
For loop with declared length 185162.0 Ops/sec
While loop 190319.1 Ops/sec
Spread operator 4655878.5 Ops/sec
Slice with begin argument 4101115.2 Ops/sec
Slice with begin and end argument 3324592.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