Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133
Windows
Desktop
one year ago
for..of (reduce) (destructuring)
63.9M/s
for..of (reduce)
63.6M/s
for..of (destructuring)
63.2M/s
for..of
62.5M/s
.for (init array)
56.1M/s
.reduce (destructuring)
54.2M/s
.reduce
49.7M/s
.forEach
41.3M/s
.map
36.1M/s
.map (destructuring)
35.3M/s
View exact numbers
Test name Executions per second
for..of (reduce) (destructuring) 63,874,252 Ops/sec
for..of (reduce) 63,571,516 Ops/sec
for..of (destructuring) 63,171,200 Ops/sec
for..of 62,540,452 Ops/sec
.for (init array) 56,116,088 Ops/sec
.reduce (destructuring) 54,160,524 Ops/sec
.reduce 49,730,352 Ops/sec
.forEach 41,316,172 Ops/sec
.map 36,072,416 Ops/sec
.map (destructuring) 35,287,688 Ops/sec
Script Preparation code:
Tests: