-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 ambiguous method checking and intersection; helps #21173 #21351
Conversation
src/subtype.c
Outdated
} | ||
} | ||
else if (!jl_egal(ai, bi)) { | ||
return 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about unions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see, you never will recurse into a union?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, so far I just ignore unions here. Turns out to be pretty effective anyway.
10e715e
to
bb1e493
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
add `obviously_disjoint` fast path to type_morespecific further helps #21173
I have a further change that gets another factor of ~2 improvement. |
@nanosoldier |
I don't expect this to affect any benchmarks --- it's basically all load time and a bit of compile time. |
Ah, okay. Sorry for triggering Nanosoldier then. |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
With this,
using ApproxFun
goes from 17 sec to 10 sec on the system I'm currently using.There are two tricks. First, I added
obviously_disjoint
, which catches easy cases of empty type intersection. Second, I made the ambiguity check a bit more efficient by taking advantage of theissubty
flag computed by type intersection to skip part of the specificity check.