Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Desktop Results:
Chrome 7 runs
Array.prototype.reduce.call()
134K/s
Conventional for loop
123K/s
Array.prototype.forEach.call()
28K/s

Fastest: Array.prototype.reduce.call() (4.7x faster)

View exact numbers
  • Array.prototype.reduce.call(): 134,074 ops/sec
  • Conventional for loop: 123,413 ops/sec
  • Array.prototype.forEach.call(): 28,386 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
    Array.prototype.reduce.call()
    Array.prototype.forEach.call()
    Conventional for loop

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Chrome 138 on Windows
View result in a separate tab
Array.prototype.reduce.call()
411K/s
Conventional for loop
351K/s
Array.prototype.forEach.call()
0/s
View exact numbers
Test name Executions per second
Array.prototype.reduce.call() 410,622 Ops/sec
Conventional for loop 350,663 Ops/sec
Array.prototype.forEach.call() 0 Ops/sec