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
one year ago
Slice with begin argument
4.1M/s
Slice with begin and end argument
2.5M/s
For loop with declared length
165K/s
View exact numbers
| Test name |
Executions per second |
|
✓
Slice with begin argument
|
4,145,791 Ops/sec |
|
Array.slice
|
3,943,376 Ops/sec |
|
Spread operator
|
3,918,886 Ops/sec |
|
Array.concat
|
3,767,114 Ops/sec |
|
Slice with begin and end argument
|
2,504,866 Ops/sec |
|
While loop
|
183,800 Ops/sec |
|
For loop with declared length
|
164,761 Ops/sec |
|
Object Assign
|
124,948 Ops/sec |
|
For loop
|
118,533 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
-
Object Assign