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