DEV Community

Discussion on: Improving Javascript functional programming with Polyethylene

Collapse
 
lexlohr profile image
Alex Lohr

Cool project, though I would argue that you could also improve the performance of the native methods by merging filter, map, etc. to a single reduce method call.

It should even be possible to automate that kind of optimization using Babel or a similar transpiler.

Collapse
 
avalander profile image
Avalander

To be honest, I'm baffled that Javascript runtimes don't do any kind of optimisation already.

Collapse
 
lexlohr profile image
Alex Lohr

I think they first aimed to optimize the single methods instead for optimizing the combinations for the simple reason that improving the performance for a single method directly improved the performance of every combination it was used in whereas you have many more combinations to improve to yield effects.