elm-community / list-extra

Convenience functions for working with List.
http://package.elm-lang.org/packages/elm-community/list-extra/latest
MIT License
135 stars 59 forks source link

Optimize interweave #68

Closed pzp1997 closed 7 years ago

pzp1997 commented 7 years ago

Benchmarks are showing a significant improvement in runtime, particularly on larger lists. For cases where the length of the shorter list is around 5 elements, there is a negligible degradation of approximately 3% over the current implementation. For cases of 50 elements, there is an improvement of over 85% over the current implementation. For cases of 1k+ elements, there are improvements of around 99% (not bad, if I daresay 😄).