Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
for..of (reduce)
170.4M/s
for
161.5M/s
for..of (reduce) (destructuring)
158.8M/s
.reduce (destructuring)
115.3M/s
.reduce
60.2M/s

Fastest: for..of (reduce) (2.8x faster)

View exact numbers
  • for..of (reduce): 170,421,568 ops/sec
  • for: 161,457,120 ops/sec
  • for..of (reduce) (destructuring): 158,846,496 ops/sec
  • .reduce (destructuring): 115,342,624 ops/sec
  • .reduce: 60,184,472 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    for
    .reduce
    .reduce (destructuring)
    for..of (reduce)
    for..of (reduce) (destructuring)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 hours ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Chrome 150 on Mac OS X 10.15.7
View result in a separate tab
for..of (reduce) (destructuring)
211.5M/s
for..of (reduce)
211.2M/s
for
210.4M/s
.reduce
197.8M/s
.reduce (destructuring)
197.1M/s
View exact numbers
Test name Executions per second
for..of (reduce) (destructuring) 211,501,376 Ops/sec
for..of (reduce) 211,188,288 Ops/sec
for 210,398,096 Ops/sec
.reduce 197,806,256 Ops/sec
.reduce (destructuring) 197,065,056 Ops/sec