Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0
Firefox 129
Mac OS X 10.15
Desktop
one year ago
for..of
60/s
.for (init array)
59/s
for..of (reduce) (destructuring)
58/s
for..of (reduce)
56/s
.forEach
55/s
.map (destructuring)
54/s
for..of (destructuring)
52/s
.map
51/s
.reduce
49/s
.reduce (destructuring)
49/s
View exact numbers
Test name Executions per second
for..of 60 Ops/sec
.for (init array) 59 Ops/sec
for..of (reduce) (destructuring) 58 Ops/sec
for..of (reduce) 56 Ops/sec
.forEach 55 Ops/sec
.map (destructuring) 54 Ops/sec
for..of (destructuring) 52 Ops/sec
.map 51 Ops/sec
.reduce 49 Ops/sec
.reduce (destructuring) 49 Ops/sec
Script Preparation code:
Tests: