Test case name | Result |
---|---|
.forEach | |
for..of | |
for..of (destructuring) | |
.map | |
.map (destructuring) | |
.for (init array) | |
.reduce | |
.reduce (destructuring) | |
for..of (reduce) | |
for..of (reduce) (destructuring) |
Test name | Executions per second |
---|---|
.forEach | 27.2 Ops/sec |
for..of | 39.7 Ops/sec |
for..of (destructuring) | 31.7 Ops/sec |
.map | 27.3 Ops/sec |
.map (destructuring) | 27.1 Ops/sec |
.for (init array) | 55.7 Ops/sec |
.reduce | 44.0 Ops/sec |
.reduce (destructuring) | 46.0 Ops/sec |
for..of (reduce) | 39.0 Ops/sec |
for..of (reduce) (destructuring) | 40.7 Ops/sec |