Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Chrome 132
Windows
Desktop
one year ago
.for (init array)
30/s
.reduce (destructuring)
30/s
for..of (reduce)
26/s
for..of
25/s
.reduce
25/s
for..of (reduce) (destructuring)
23/s
.map (destructuring)
20/s
for..of (destructuring)
20/s
.map
20/s
.forEach
16/s
View exact numbers
Test name Executions per second
.for (init array) 30 Ops/sec
.reduce (destructuring) 30 Ops/sec
for..of (reduce) 26 Ops/sec
for..of 25 Ops/sec
.reduce 25 Ops/sec
for..of (reduce) (destructuring) 23 Ops/sec
.map (destructuring) 20 Ops/sec
for..of (destructuring) 20 Ops/sec
.map 20 Ops/sec
.forEach 16 Ops/sec
Script Preparation code:
Tests: