Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0
Firefox 136
Mac OS X 10.15
Desktop
one year ago
for..of (reduce)
92/s
for..of (reduce) (destructuring)
90/s
for..of
87/s
.forEach
87/s
.for (init array)
87/s
.map
78/s
.map (destructuring)
78/s
for..of (destructuring)
76/s
.reduce
74/s
.reduce (destructuring)
73/s
View exact numbers
Test name Executions per second
for..of (reduce) 92 Ops/sec
for..of (reduce) (destructuring) 90 Ops/sec
for..of 87 Ops/sec
.forEach 87 Ops/sec
.for (init array) 87 Ops/sec
.map 78 Ops/sec
.map (destructuring) 78 Ops/sec
for..of (destructuring) 76 Ops/sec
.reduce 74 Ops/sec
.reduce (destructuring) 73 Ops/sec
Script Preparation code:
Tests: