Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134
Mac OS X 10.15.7
Desktop
one year ago
.for (init array)
104/s
.reduce (destructuring)
76/s
for..of (reduce) (destructuring)
75/s
for..of
75/s
for..of (reduce)
74/s
.reduce
73/s
.map (destructuring)
66/s
.map
66/s
for..of (destructuring)
54/s
.forEach
52/s
View exact numbers
Test name Executions per second
.for (init array) 104 Ops/sec
.reduce (destructuring) 76 Ops/sec
for..of (reduce) (destructuring) 75 Ops/sec
for..of 75 Ops/sec
for..of (reduce) 74 Ops/sec
.reduce 73 Ops/sec
.map (destructuring) 66 Ops/sec
.map 66 Ops/sec
for..of (destructuring) 54 Ops/sec
.forEach 52 Ops/sec
Script Preparation code:
Tests: