Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Windows
Desktop
2 years ago
for..of (reduce) (destructuring)
28/s
.for (init array)
27/s
for..of
25/s
for..of (reduce)
24/s
.reduce (destructuring)
24/s
.reduce
24/s
.forEach
24/s
for..of (destructuring)
16/s
.map
16/s
.map (destructuring)
16/s
View exact numbers
Test name Executions per second
for..of (reduce) (destructuring) 28 Ops/sec
.for (init array) 27 Ops/sec
for..of 25 Ops/sec
for..of (reduce) 24 Ops/sec
.reduce (destructuring) 24 Ops/sec
.reduce 24 Ops/sec
.forEach 24 Ops/sec
for..of (destructuring) 16 Ops/sec
.map 16 Ops/sec
.map (destructuring) 16 Ops/sec
Script Preparation code:
Tests: