Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0
Firefox 147
Mac OS X 10.15
Desktop
5 months ago
.forEach
42/s
for..of
23/s
for..of (reduce) (destructuring)
23/s
.for (init array)
23/s
for..of (reduce)
23/s
.map (destructuring)
22/s
.map
22/s
for..of (destructuring)
22/s
.reduce
21/s
.reduce (destructuring)
21/s
View exact numbers
Test name Executions per second
.forEach 42 Ops/sec
for..of 23 Ops/sec
for..of (reduce) (destructuring) 23 Ops/sec
.for (init array) 23 Ops/sec
for..of (reduce) 23 Ops/sec
.map (destructuring) 22 Ops/sec
.map 22 Ops/sec
for..of (destructuring) 22 Ops/sec
.reduce 21 Ops/sec
.reduce (destructuring) 21 Ops/sec
Script Preparation code:
Tests: