Run details:
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
Windows
Desktop
one year ago
Benchmark.js
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
Script Preparation code:
Tests: