-
-
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
Bounds-checking not elided in isassigned
for a SlowSubArray
despite @inbounds
and @inline
annotations
#53302
Comments
It seems correct there though (or equivalently, it is incorrect to specify removing bounds), as you are indexing src with the bounds of dst, which is indeed unsound if it removed boundschecking |
It's surely just a method in need of bounds check propagation: julia/base/multidimensional.jl Lines 1568 to 1571 in 81c6526
That's why it's only appearing for a "slow" array — eachindex gives you |
Yes, that is true of |
Close #53302 --------- Co-authored-by: Matt Bauman <[email protected]>
…ng#53305) Close JuliaLang#53302 --------- Co-authored-by: Matt Bauman <[email protected]>
Reposting from https://discourse.julialang.org/t/why-is-the-bounds-checking-not-elided-in-isassigned-for-slowsubarray-s-despite-an-inbounds-annotation/110019 as there were no replies, and this seems like something that may be improved. Please close if this is not actionable.
Defining
The relevant bit of the output is
This is on
The expectation here is that the bounds-check will be skipped.
Full output
The text was updated successfully, but these errors were encountered: