Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36
Chrome 103
Linux
Desktop
one year ago
Test name Executions per second
Array.concat 2711662.8 Ops/sec
Array.slice 2807345.0 Ops/sec
For loop 74873.2 Ops/sec
For loop with declared length 107571.1 Ops/sec
While loop 115411.2 Ops/sec
Spread operator 2677828.8 Ops/sec
Slice with begin argument 2791837.2 Ops/sec
Slice with begin and end argument 1683946.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