You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[spreads][rfc] Unify OpenTs in widen_type
Summary:
Creating all of these new OpenTs can pose a performance problem. The added test case takes ~20 seconds without unification here, but is almost instant when there is unification. The final type-at-pos result is still just quadratic in both cases.
I've observed the slowdown to occur during the OpenT ~> OpenT flow. I think so many OpenTs are created that even just forwarding the flows takes a long time without unification.
If it's not safe to unify here in general, I made a special reason desc for OpenTs created during widening and only Flow/Unify to the OpenTs in widening if that tvar was created by the widening process. Otherwise, we create a new OpenT with the special reason desc and use that type.
Note that the overall perf impact here is neutral, even though it speeds up this specific case.
Reviewed By: avikchaudhuri
Differential Revision: D17798281
fbshipit-source-id: 4223ce891ceab44dbab72da10cce0caf27c2c4e1