Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134
Linux
Desktop
one year ago
.for (init array)
49/s
for..of (reduce) (destructuring)
48/s
.forEach
46/s
for..of
44/s
for..of (reduce)
44/s
.reduce
44/s
.reduce (destructuring)
43/s
.map (destructuring)
37/s
.map
36/s
for..of (destructuring)
30/s
View exact numbers
Test name Executions per second
.for (init array) 49 Ops/sec
for..of (reduce) (destructuring) 48 Ops/sec
.forEach 46 Ops/sec
for..of 44 Ops/sec
for..of (reduce) 44 Ops/sec
.reduce 44 Ops/sec
.reduce (destructuring) 43 Ops/sec
.map (destructuring) 37 Ops/sec
.map 36 Ops/sec
for..of (destructuring) 30 Ops/sec
Script Preparation code:
Tests: