Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0
Firefox 138
Mac OS X 10.15
Desktop
one year ago
.for (init array)
64/s
for..of (reduce) (destructuring)
62/s
for..of
61/s
for..of (reduce)
60/s
.forEach
57/s
for..of (destructuring)
54/s
.map
53/s
.map (destructuring)
53/s
.reduce (destructuring)
53/s
.reduce
52/s
View exact numbers
Test name Executions per second
.for (init array) 64 Ops/sec
for..of (reduce) (destructuring) 62 Ops/sec
for..of 61 Ops/sec
for..of (reduce) 60 Ops/sec
.forEach 57 Ops/sec
for..of (destructuring) 54 Ops/sec
.map 53 Ops/sec
.map (destructuring) 53 Ops/sec
.reduce (destructuring) 53 Ops/sec
.reduce 52 Ops/sec
Script Preparation code:
Tests: