Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make combine faster #72

Merged
merged 1 commit into from
Dec 17, 2021
Merged

Conversation

jfmengels
Copy link
Contributor

This PR makes Maybe.Extra.combine a lot faster. I have described the approach and the benefits in an extremely similar PR for Result.Extra.combine. But in summary, we avoid a lot of unnecessary wrapping and unwrapping. The biggest gain is that if a value in the list is Nothing, we stop right there, instead of looping over the entire list even more.

I made a benchmark for this change, and here are the results on Chrome:

@jfmengels jfmengels mentioned this pull request Dec 5, 2021
Copy link
Collaborator

@skyqrose skyqrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all these great contributions (and sorry for taking so long to review them).

@skyqrose skyqrose merged commit 71d222b into elm-community:master Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants