Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Windows
Desktop
one year ago
Benchmark.js
Custom Array.prototype.forEach()
1K/s
Traditional for loop
952/s
Array.prototype.forEach()
926/s
lodash forEach
779/s
View exact numbers
Test name Executions per second
Custom Array.prototype.forEach() 1,037 Ops/sec
Traditional for loop 952 Ops/sec
Array.prototype.forEach() 926 Ops/sec
lodash forEach 779 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: