Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Linux
Desktop
one year ago
for..of (reduce)
33/s
.reduce (destructuring)
32/s
.for (init array)
30/s
.reduce
30/s
for..of
30/s
for..of (reduce) (destructuring)
29/s
.forEach
25/s
.map (destructuring)
23/s
for..of (destructuring)
19/s
.map
17/s
View exact numbers
Test name Executions per second
for..of (reduce) 33 Ops/sec
.reduce (destructuring) 32 Ops/sec
.for (init array) 30 Ops/sec
.reduce 30 Ops/sec
for..of 30 Ops/sec
for..of (reduce) (destructuring) 29 Ops/sec
.forEach 25 Ops/sec
.map (destructuring) 23 Ops/sec
for..of (destructuring) 19 Ops/sec
.map 17 Ops/sec
Script Preparation code:
Tests: