Tests:
for loop
Array.prototype.reduce.call
String.prototype.reduce
Array.prototype.forEach
.split.reduce
.split.forEach
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
4 months ago )
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Browser/OS:
Chrome 146 on Windows
View result in a separate tab
Embed
String.prototype.reduce
1.7M/s
Array.prototype.forEach
1.7M/s
Array.prototype.reduce.call
1.6M/s
View exact numbers
Test name
Executions per second
✓
for loop
12,871,441 Ops/sec
.split.reduce
9,470,044 Ops/sec
.split.forEach
8,388,160 Ops/sec
String.prototype.reduce
1,700,552 Ops/sec
Array.prototype.forEach
1,660,419 Ops/sec
Array.prototype.reduce.call
1,632,480 Ops/sec
Do you really want to delete benchmark?