Test case name | Result |
---|---|
foreach | |
for | |
map | |
for..of | |
slice + [x, ...y] | |
for (no slice) | |
for + push | |
slice + [x, ...y] v2 | |
slice + [x, ...y] v3 |
Test name | Executions per second |
---|---|
foreach | 23487.2 Ops/sec |
for | 11938.3 Ops/sec |
map | 22811.2 Ops/sec |
for..of | 21701.9 Ops/sec |
slice + [x, ...y] | 18631.7 Ops/sec |
for (no slice) | 7851.7 Ops/sec |
for + push | 7491.2 Ops/sec |
slice + [x, ...y] v2 | 18574.8 Ops/sec |
slice + [x, ...y] v3 | 18667.1 Ops/sec |