-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
improve accuracy of ambiguity checking (take 2) #37616
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
Conversation
Removes a part of #36962 that was the source of major ire by several users: This restores some abort code paths that I had put in place to cause isambiguous to return incorrect answers in this particular case. Even though the underlying algorithm can now deal with these cases correctly, users were not pleased that the algorithm was now handling these cases correctly and attacked with gusto. Additionally, it fixes a performance bug in ml-matches, where I'd accidentally set two flags in the wrong direction, which were still conservatively correct, but prevented us from using the fast path.
And I guess #37458 has been fixed not to happen again? |
Yes that’s the expectation, as I mentioned above, this continues to explicitly skip reporting ambiguities that might occur when type intersection Information seems poor. It remains a probable performance drain, but we’ll continue to avoid reporting them. |
For me this still seems to slow down Plots.jl time: Before
After
Is that just for me? |
That's way below the variability I see for just building master. It can be somewhat more accurately measured by only rebuilding the src files. There's a small additional cost (I'd say about 10%), but that is just reflective of the bad job type-intersection is already doing on a range of important queries and so should see a more substantial speedup from fixing that (#36951). |
It seems pretty consistent to me: PR:
Master:
A blanket 17% regression seems significant. Are you saying there is other work in the pipeline that brings this back or that we just have to eat this regression? Just looking at it from an outsider's p.o.v it seems unfortunate but I realize I don't have all the context for what this change does and what's upcoming. |
I can't tell exactly what you're measuring just from that, but it looks like you're not actually rebuilding, so the repeated trials aren't providing any useful additional information |
I don't know if the work is in the pipeline, but that is why I keep pointing to the issue issue I created to document why this is an existing problem with master #36951
Such a number is absolutely devoid of meaning without context. The context I'm attempting to give is that #36951 appears to cause significant extra work (disabling just some of the effect of it seems to take the ambiguity test here from about 80 seconds to about 14). On balance, this is intended to help stabilize #36733 to ensure we don't get odd ordering-related dependencies where latency times suddenly spike in certain circumstances (rebuilds). |
There was a small typo in the original PR that caused this to disable a useful fast path in a few cases. Users were also unhappy to discover that poor type-intersection results that steal away performance were now being reported. Hide those again to calm the irate masses. Also finishes fixing detect_unbound_args and detect_ambiguities to correctly support #31916 (which only implemented a subset of the required corrections). This should now be faster and simpler to use, as it can avoid substantial excess work when used by a package to check itself.