Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Chrome 136
Linux
Desktop
one year ago
.for (init array)
32/s
.reduce (destructuring)
27/s
for..of
27/s
.reduce
26/s
for..of (reduce) (destructuring)
26/s
for..of (reduce)
24/s
.map (destructuring)
21/s
.map
21/s
for..of (destructuring)
19/s
.forEach
15/s
View exact numbers
Test name Executions per second
.for (init array) 32 Ops/sec
.reduce (destructuring) 27 Ops/sec
for..of 27 Ops/sec
.reduce 26 Ops/sec
for..of (reduce) (destructuring) 26 Ops/sec
for..of (reduce) 24 Ops/sec
.map (destructuring) 21 Ops/sec
.map 21 Ops/sec
for..of (destructuring) 19 Ops/sec
.forEach 15 Ops/sec
Script Preparation code:
Tests: