Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Firefox 133
Windows
Desktop
one year ago
.reduce
55/s
.reduce (destructuring)
53/s
.forEach
53/s
for..of (reduce) (destructuring)
52/s
for..of (reduce)
51/s
for..of
50/s
.for (init array)
48/s
.map (destructuring)
47/s
.map
47/s
for..of (destructuring)
45/s
View exact numbers
Test name Executions per second
.reduce 55 Ops/sec
.reduce (destructuring) 53 Ops/sec
.forEach 53 Ops/sec
for..of (reduce) (destructuring) 52 Ops/sec
for..of (reduce) 51 Ops/sec
for..of 50 Ops/sec
.for (init array) 48 Ops/sec
.map (destructuring) 47 Ops/sec
.map 47 Ops/sec
for..of (destructuring) 45 Ops/sec
Script Preparation code:
Tests: