Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Chrome 104
Linux
Desktop
3 months ago
Test name Executions per second
Array.concat 3767114.0 Ops/sec
Array.slice 3943375.8 Ops/sec
For loop 118533.2 Ops/sec
For loop with declared length 164761.0 Ops/sec
While loop 183800.5 Ops/sec
Spread operator 3918885.8 Ops/sec
Slice with begin argument 4145791.0 Ops/sec
Slice with begin and end argument 2504865.8 Ops/sec
Object Assign 124948.1 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

  • Object Assign