Skip to content

Perf optimizations and inferred intersections #14605

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

Merged
merged 10 commits into from
Jul 3, 2025

Conversation

gldubc
Copy link
Member

@gldubc gldubc commented Jun 25, 2025

    1. Memoize phi().
    1. Fast path: if there are no none() in the arguments of an intersection, we can compute subtyping quicker using fun_apply
    1. Remove duplicates in tuple_difference (reuses tuple_union logic).
  1. and 3. are sufficient to make the fun_from_inferred_clauses work.
  2. will be necessary for large function intersections with empty arguments.

Also adds inferred intersection types, in fun_from_inferred_clauses.

@josevalim josevalim merged commit 824fc3b into elixir-lang:main Jul 3, 2025
13 checks passed
@josevalim josevalim deleted the fun-optimizations branch July 3, 2025 09:40
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants