elm-optimize-level-2 icon indicating copy to clipboard operation
elm-optimize-level-2 copied to clipboard

Optimizations for Zip like functions

Open Wheatwizard opened this issue 3 years ago • 0 comments

List Zipping

For the existing implementions of list zipping functions, (ie List.map2, List.map3, List.map4, and List.map5) Elm builds a Javascript array containing the results and then converts it to an Elm List. We can replace this implementation with a faster one that builds the result List with no intermediate steps.

Results Summary

  • The improved implementations of List.map2 and List.map3 are benchmarked here, which sees performance improvements over Elm's normal List.map2 and List.map3.

Wheatwizard avatar Feb 12 '22 20:02 Wheatwizard