-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
Labels
performancePotential performance improvementPotential performance improvement
Description
The new collection literal inference is running into problems with the performance of union type normalization. Aggressive literal promotion helps avoid generating large unions, but sometime it is unavoidable. For example, this dictionary in mitmproxy, or this list in CPython.
I'm not sure if there's potential to improve the performance of normalization itself, or if we should fallback to a wider type if the union of the element types grows too large. It does feel like there's some exponential behavior here that should be avoidable, as the issue arises for unions that are only ~10 elements large.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
performancePotential performance improvementPotential performance improvement