DEV Community

Discussion on: filter, map and reduce in JS. When and Where to use??

lukeshiru profile image

"performance loss is too great" ... have you actually ran the code above? Browsers optimize those kind of chained operations. The performance difference might br noticeable maybe with, idk, 100k items, but if you have to filter/map that amount of items, your problem is elsewhere.....