Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Chrome 139
Linux
Desktop
one year ago
.for (init array)
26/s
for..of (reduce) (destructuring)
24/s
for..of (reduce)
23/s
.reduce
23/s
.reduce (destructuring)
22/s
for..of
22/s
.map
20/s
.map (destructuring)
20/s
for..of (destructuring)
18/s
.forEach
14/s
View exact numbers
Test name Executions per second
.for (init array) 26 Ops/sec
for..of (reduce) (destructuring) 24 Ops/sec
for..of (reduce) 23 Ops/sec
.reduce 23 Ops/sec
.reduce (destructuring) 22 Ops/sec
for..of 22 Ops/sec
.map 20 Ops/sec
.map (destructuring) 20 Ops/sec
for..of (destructuring) 18 Ops/sec
.forEach 14 Ops/sec
Script Preparation code:
Tests: