Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Linux
Desktop
one year ago
.for (init array)
27/s
for..of (reduce)
25/s
.reduce (destructuring)
23/s
.reduce
22/s
for..of (reduce) (destructuring)
22/s
for..of
21/s
.map
18/s
.map (destructuring)
18/s
for..of (destructuring)
16/s
.forEach
15/s
View exact numbers
Test name Executions per second
.for (init array) 27 Ops/sec
for..of (reduce) 25 Ops/sec
.reduce (destructuring) 23 Ops/sec
.reduce 22 Ops/sec
for..of (reduce) (destructuring) 22 Ops/sec
for..of 21 Ops/sec
.map 18 Ops/sec
.map (destructuring) 18 Ops/sec
for..of (destructuring) 16 Ops/sec
.forEach 15 Ops/sec
Script Preparation code:
Tests: