Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Windows
Desktop
one month ago
Test name Executions per second
Array.concat 2033648.1 Ops/sec
Array.slice 2068940.4 Ops/sec
For loop 56950.5 Ops/sec
For loop with declared length 87725.0 Ops/sec
While loop 89962.5 Ops/sec
Spread operator 1988097.8 Ops/sec
Slice with begin argument 2226458.2 Ops/sec
Slice with begin and end argument 1444780.9 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