-
-
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
Improve type stability of array_subpadding slightly #48136
Conversation
This should be slightly more efficient as the compiler now only tries to call `iterate` on `t` and `s` once, and will not try to destructure the result if the `iterate` call returns `nothing`. This change reduce spurious JET warnings.
checked_size = 0 | ||
ps, sstate = iterate(s) # use of Stateful harms inference and makes this vulnerable to invalidation | ||
pad, tstate = iterate(t) | ||
# use of Stateful harms inference and makes this vulnerable to invalidation |
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 does not seem to use Stateful, but just the normal iterate algorithm?
# use of Stateful harms inference and makes this vulnerable to invalidation |
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 guess it was written with Stateful before and got changed to not use it and this is here as a hint for future developers to not put that back?
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.
Correct - it was changed some time before 1.9 by Tim Holy in hunt of invalidations. I left the comment.
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.
Test failures are unrelated. |
This should be slightly more efficient as the compiler now only tries to call `iterate` on `t` and `s` once, and will not try to destructure the result if the `iterate` call returns `nothing`. This change reduce spurious JET warnings.
This should be slightly more efficient as the compiler now only tries to call `iterate` on `t` and `s` once, and will not try to destructure the result if the `iterate` call returns `nothing`. This change reduce spurious JET warnings.
This should be slightly more efficient as the compiler now only tries to call `iterate` on `t` and `s` once, and will not try to destructure the result if the `iterate` call returns `nothing`. This change reduce spurious JET warnings.
This should be slightly more efficient as the compiler now only tries to call
iterate
ont
ands
once, and will not try to destructure the result if theiterate
call returnsnothing
.This change reduce spurious JET warnings.