koajs / router

Router middleware for Koa. Maintained by @forwardemail and @ladjs.
MIT License
871 stars 176 forks source link

`forEach` should be rewritten to `for` loop for optimized boot performance #42

Closed niftylettuce closed 4 years ago

golopot commented 4 years ago

Do you mean ES1 for loop or ES6 for of loop?

kravorkid commented 4 years ago

@golopot Guess he is talking about a classic ES1 for loop seems to be much faster than a for of

niftylettuce commented 4 years ago

Correct

JacobMGEvans commented 4 years ago

I may take a look at this.

I'll use the counter for over the for of as suggested.