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 Edg/129.0.0.0
Chrome 129
Windows
Desktop
2 months ago
Test name Executions per second
Array.concat 28733262.0 Ops/sec
Array.slice 29312088.0 Ops/sec
For loop 563356.5 Ops/sec
For loop with declared length 1011488.1 Ops/sec
While loop 1080863.4 Ops/sec
Spread operator 29407558.0 Ops/sec
Slice with begin argument 30503984.0 Ops/sec
Slice with begin and end argument 14306228.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