Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Firefox 133
Linux
Desktop
one year ago
.reduce
31/s
.reduce (destructuring)
31/s
for..of (reduce)
31/s
for..of (reduce) (destructuring)
30/s
.forEach
29/s
for..of
29/s
.for (init array)
27/s
.map (destructuring)
26/s
for..of (destructuring)
26/s
.map
26/s
View exact numbers
Test name Executions per second
.reduce 31 Ops/sec
.reduce (destructuring) 31 Ops/sec
for..of (reduce) 31 Ops/sec
for..of (reduce) (destructuring) 30 Ops/sec
.forEach 29 Ops/sec
for..of 29 Ops/sec
.for (init array) 27 Ops/sec
.map (destructuring) 26 Ops/sec
for..of (destructuring) 26 Ops/sec
.map 26 Ops/sec
Script Preparation code:
Tests: