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 >> and << in compiled JS #219

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Optimize >> and << in compiled JS #219

merged 1 commit into from
Jul 15, 2024

Conversation

jfmengels
Copy link
Owner

This effectively changes Elm's core >> and << from (roughly)

(<<) g f x =
  g (f x)

-- to

(<<) g f =
  \x ->
    g (f x)

In other words, the composition functions are now wrapped in F2 instead of F3, which yields much better performance because it gets applied using A2(composeL, f, g) in practice.

@jfmengels
Copy link
Owner Author

Reflects the changes done in elm/core#1145

@jfmengels jfmengels merged commit 301d083 into main Jul 15, 2024
4 checks passed
@jfmengels jfmengels deleted the optimize-composition branch July 15, 2024 11:30
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