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

Speed up make_simplified_union #14370

Merged
merged 1 commit into from
Dec 29, 2022
Merged

Speed up make_simplified_union #14370

merged 1 commit into from
Dec 29, 2022

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Dec 29, 2022

If there is only one non-union item, there's nothing interesting to do. This is pretty common, and it avoids a fairly expensive _remove_redundant_union_items call.

(Various small optimizations, including this, together netted a 6% performance improvement in self check.)

If there is only one non-union item, there's nothing interesting to do.
This is pretty common, and it avoids a fairly expensive
`_remove_redundant_union_items` call.
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JukkaL JukkaL merged commit 9183b28 into master Dec 29, 2022
@JukkaL JukkaL deleted the faster-union-simplify branch December 29, 2022 15:18
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