Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Windows
Desktop
one year ago
Slice with begin argument
3.4M/s
Slice with begin and end argument
2.2M/s
For loop with declared length
130K/s
View exact numbers
| Test name |
Executions per second |
|
✓
Slice with begin argument
|
3,431,886 Ops/sec |
|
Spread operator
|
3,327,696 Ops/sec |
|
Array.concat
|
3,315,430 Ops/sec |
|
Array.slice
|
3,300,158 Ops/sec |
|
Slice with begin and end argument
|
2,225,193 Ops/sec |
|
While loop
|
138,394 Ops/sec |
|
For loop with declared length
|
129,563 Ops/sec |
|
For loop
|
92,926 Ops/sec |
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