-
-
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
only cache concrete types #57442
base: master
Are you sure you want to change the base?
only cache concrete types #57442
Conversation
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.
I am okay with this, if it passes CI here. It may expose some unsoundness more, but I think those cases would already have been more problematic elsewhere, so this doesn't seem likely to make it worse, and it makes sense this should fix this case.
awesome, thanks for the fast review do you have any suggestions for a good test? I could do something like
but I'm worried this is too high-level (it technically depends on broadcast implementation as well) |
failure is legit and comes from although maybe this is expected? since |
} | ||
else { | ||
jl_datatype_t *dtuw = (jl_datatype_t*)uw; | ||
if (!dtuw->isconcretetype || dtuw->name->wrapper != p) |
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.
if (!dtuw->isconcretetype || dtuw->name->wrapper != p) | |
if (!dtuw->isconcretetype && dtuw->name->wrapper != p) |
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.
this change appears to reintroduce the performance problem
I believe too many types are being constructed (causing allocations) when nonconcrete hash entries collide with the desired concrete type
appears to fix #57434 (at least back to
<=1.9
performance)I will admit I am not 100% sure I understand why this works, nor am I sure what the best way to add a test is besides add this example as a benchmark.