Faster List.foldr and List.map

Affichage de 12 messages sur 2
Faster List.foldr and List.map Ilias Van Peer 26/09/17 06:54
Hi,

Inspired by a tweet about faster List.map for ocaml, I started experimenting and it turns out that writing implementations for `map` and `foldr` in pure Elm - which outperform both the current implementation as well as Robin's 0.19 implementation - is possible in a stack-safe manner.

More info, a bunch of charts and a gazillion benchmarks: https://github.com/zwilias/elm-faster-map

I've asked a few people for feedback in private, but at this point I feel confident enough about the results to ask the wider community for feedback. So please, check it out, see if you can find issues with the implementation or the theory.

Would there be any interest in a PR to implement this in elm-lang/core?

Feel free to contact me on Slack to talk things through.

Kind regards,

Ilias
Re: [elm-dev] Faster List.foldr and List.map Evan Czaplicki 17/10/17 13:14
Very cool! I saw that blog post as well and was curious how it would work.

My main question is about how big the code is. I have been working a ton on getting asset sizes to be super tiny, and I think it's valuable to evaluate performance alongside the distribution cost.

I'm not sure it'll be easy to evaluate that until there is a 0.19 alpha to try out, but once we can put some numbers on both halves of this, I think it'll be way easier to make a call on this.

Great work!
Evan

--
You received this message because you are subscribed to the Google Groups "elm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elm-dev/85c74830-f79f-4415-bd6f-7355e77355dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.