Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:134.0) Gecko/20100101 Firefox/134.0
Firefox 134
Mac OS X 10.15
Desktop
one year ago
for..of (reduce)
86/s
.for (init array)
85/s
for..of
85/s
for..of (reduce) (destructuring)
84/s
.forEach
84/s
.map
77/s
.map (destructuring)
76/s
for..of (destructuring)
75/s
.reduce (destructuring)
73/s
.reduce
70/s
View exact numbers
Test name Executions per second
for..of (reduce) 86 Ops/sec
.for (init array) 85 Ops/sec
for..of 85 Ops/sec
for..of (reduce) (destructuring) 84 Ops/sec
.forEach 84 Ops/sec
.map 77 Ops/sec
.map (destructuring) 76 Ops/sec
for..of (destructuring) 75 Ops/sec
.reduce (destructuring) 73 Ops/sec
.reduce 70 Ops/sec
Script Preparation code:
Tests: