Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Windows
Desktop
one year ago
for..of (reduce)
34/s
.for (init array)
34/s
for..of (reduce) (destructuring)
33/s
.forEach
31/s
for..of
31/s
.reduce (destructuring)
30/s
.reduce
29/s
.map
21/s
.map (destructuring)
20/s
for..of (destructuring)
19/s
View exact numbers
Test name Executions per second
for..of (reduce) 34 Ops/sec
.for (init array) 34 Ops/sec
for..of (reduce) (destructuring) 33 Ops/sec
.forEach 31 Ops/sec
for..of 31 Ops/sec
.reduce (destructuring) 30 Ops/sec
.reduce 29 Ops/sec
.map 21 Ops/sec
.map (destructuring) 20 Ops/sec
for..of (destructuring) 19 Ops/sec
Script Preparation code:
Tests: