-
-
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
Fix type instability in push! #13977
Conversation
Amazing we never caught this before---that seems to have been there since 2011! I guess it's because folks expect Nice work. |
it makes me a little sad that this makes a difference. one more thing to be vigilant of for perf sensitive code. |
Oh, and of course in most cases the value is probably already of type |
Yeah, it's probably not too common. This is only a bottleneck if |
Yes, why did the old formulation trip up type inference? I thought it was based on the data flow. |
Because the variable |
I always imagined that types were inferred separately for a variable at each point in the code. Ok, good to know. |
Yeah, it's an obvious optimization that Julia doesn't do yet. It's kind of amazing how far we get on what we do optimize. |
It doesn't really trip up type inference ( |
Ok, thanks for the clarifications! |
Before:
After: