Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Mobile Safari/537.36
Chrome Mobile 118
Android
Mobile
2 years ago
for..of (reduce) (destructuring)
16/s
for..of (reduce)
15/s
for..of
15/s
.reduce
15/s
.reduce (destructuring)
14/s
.for (init array)
14/s
.forEach
11/s
.map (destructuring)
9/s
for..of (destructuring)
8/s
.map
7/s
View exact numbers
Test name Executions per second
for..of (reduce) (destructuring) 16 Ops/sec
for..of (reduce) 15 Ops/sec
for..of 15 Ops/sec
.reduce 15 Ops/sec
.reduce (destructuring) 14 Ops/sec
.for (init array) 14 Ops/sec
.forEach 11 Ops/sec
.map (destructuring) 9 Ops/sec
for..of (destructuring) 8 Ops/sec
.map 7 Ops/sec
Script Preparation code:
Tests: