DEV Community

Discussion on: Filter Arrays with the Javascript Filter() Method

Collapse
 
raiivis profile image
Raivis Vasiļevskis

Nicer synthax doesn't always mean better results. This way is slower than traditional for loop. Probably it does not matter for small arrays, but try to test it with large arrays. You will see quite a big difference in the speed

Collapse
 
joelnet profile image
JavaScript Joel

This statement is misleading. In reality there will be zero impact to performance within an application. Unless you are designing a game engine, this metric is worthless.