Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Linux
Desktop
one year ago
.reduce
43/s
for..of (reduce) (destructuring)
42/s
.reduce (destructuring)
38/s
.for (init array)
34/s
for..of (reduce)
32/s
for..of
32/s
.forEach
31/s
.map (destructuring)
26/s
.map
22/s
for..of (destructuring)
19/s
View exact numbers
Test name Executions per second
.reduce 43 Ops/sec
for..of (reduce) (destructuring) 42 Ops/sec
.reduce (destructuring) 38 Ops/sec
.for (init array) 34 Ops/sec
for..of (reduce) 32 Ops/sec
for..of 32 Ops/sec
.forEach 31 Ops/sec
.map (destructuring) 26 Ops/sec
.map 22 Ops/sec
for..of (destructuring) 19 Ops/sec
Script Preparation code:
Tests: