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