Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137
Linux
Desktop
one year ago
.for (init array)
83/s
for..of (reduce)
70/s
for..of
66/s
.reduce (destructuring)
65/s
.reduce
65/s
for..of (reduce) (destructuring)
64/s
.map
59/s
.map (destructuring)
57/s
for..of (destructuring)
53/s
.forEach
43/s
View exact numbers
Test name Executions per second
.for (init array) 83 Ops/sec
for..of (reduce) 70 Ops/sec
for..of 66 Ops/sec
.reduce (destructuring) 65 Ops/sec
.reduce 65 Ops/sec
for..of (reduce) (destructuring) 64 Ops/sec
.map 59 Ops/sec
.map (destructuring) 57 Ops/sec
for..of (destructuring) 53 Ops/sec
.forEach 43 Ops/sec
Script Preparation code:
Tests: