Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0
Firefox 139
Mac OS X 10.15
Desktop
one year ago
.reduce (destructuring)
73/s
for..of (reduce)
41/s
for..of (reduce) (destructuring)
36/s
.forEach
36/s
for..of
19/s
.for (init array)
18/s
.reduce
17/s
.map (destructuring)
15/s
.map
14/s
for..of (destructuring)
8/s
View exact numbers
Test name Executions per second
.reduce (destructuring) 73 Ops/sec
for..of (reduce) 41 Ops/sec
for..of (reduce) (destructuring) 36 Ops/sec
.forEach 36 Ops/sec
for..of 19 Ops/sec
.for (init array) 18 Ops/sec
.reduce 17 Ops/sec
.map (destructuring) 15 Ops/sec
.map 14 Ops/sec
for..of (destructuring) 8 Ops/sec
Script Preparation code:
Tests: