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
This is just a follow up to the conversation I had with @brianhuffman about certain modules (around 2K loc) taking longer than expected. I can provide further details on request.
The text was updated successfully, but these errors were encountered:
After looking into this, it seems that the @@ operation to combine Subst values (used for unification of type variables during type checking) becomes a bottleneck when the substitution gets large. I have some ideas for different ways to implement this more efficiently.
Switching Subst to use IntMap instead of Map gives a significant constant-factor speedup. However, the asymptotic run-time performance is still bad: at least cubic in the size of the input.
The problematic input mentioned in the original post was an unusually difficult case, in that it was not only big, but contained a very high number of local declarations inside where blocks. We expect that situations where the Subst values in unification are a performance bottleneck will be quite rare, so we'll close this ticket, at least until it becomes a problem for someone again.
This is just a follow up to the conversation I had with @brianhuffman about certain modules (around 2K loc) taking longer than expected. I can provide further details on request.
The text was updated successfully, but these errors were encountered: