Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Windows
Desktop
one year ago
Benchmark.js
Custom Array.prototype.forEach()
128/s
Array.prototype.forEach()
111/s
lodash forEach
94/s
Traditional for loop
51/s
View exact numbers
Test name Executions per second
Custom Array.prototype.forEach() 128 Ops/sec
Array.prototype.forEach() 111 Ops/sec
lodash forEach 94 Ops/sec
Traditional for loop 51 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: