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

Optimize implementation of zipWith and map #32

Merged
merged 7 commits into from
Dec 16, 2024
Merged

Optimize implementation of zipWith and map #32

merged 7 commits into from
Dec 16, 2024

Conversation

Shimuuar
Copy link
Owner

At the moment they are implemented in terms of zipWith and imap. This creates extra work for optimizer which has to strip unused parameters at each call site.

Also add another unrelated compile time optimization to zipWith

This removes traversal of Fun and reduces amount of work optimizer need to do
slightly (~10% allocation reduction)
It reduces amount of work for GHC a bit. Note that zipWith is very common and
izipWith is rare. So extra code is justified in this case
@Shimuuar Shimuuar merged commit 9c600d2 into master Dec 16, 2024
7 checks passed
@Shimuuar Shimuuar deleted the optimize-zip branch December 16, 2024 13:39
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.

1 participant