-
-
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
audit inbounds for arrays #46911
base: master
Are you sure you want to change the base?
audit inbounds for arrays #46911
Conversation
Remove some unnecessary and incorrect inbounds annotations. Fix #46879
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
while true | ||
y = iterate(itr, st) | ||
y === nothing && break | ||
el, st = y | ||
@assert len == length(dest) | ||
if el isa T | ||
@inbounds dest[i] = el |
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.
@aviatesk could we make this @inbounds
conditional on iterate(itr, st)
being pure and inlined (e.g. a simple load or computation)? That is the only case where this might SIMD, and thus the main case where we might care to eliminate the check here.
(We would like to check also if the user miscomputed length(itr)
also and so this ran too many or too few iterations, but that seems harder)
This seems like a good PR to get merged. |
Remove some unnecessary and incorrect inbounds annotations.
Fix #46879
@nanosoldier
runbenchmarks(!"scalar" && !"union", vs=":master")