We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems like this construct should operate in-place, but it apparently doesn't:
function foo(A) for i = 1:10^6 A[:] = 0 end end @time foo([3,4,5])
gives
0.021217 seconds (1.00 M allocations: 15.259 MB, 23.12% gc time)
Notice that it is apparently allocating something on each loop iteration. (Same on 0.4 and 0.5.)
The text was updated successfully, but these errors were encountered:
The allocation is caused by the vararg call.
Sorry, something went wrong.
We should have a specialized setindex method for this case that just calls fill!.
setindex
fill!
Ref #13459 (comment) , maybe .... It looks like we are getting close to fix #13359 though....
No branches or pull requests
It seems like this construct should operate in-place, but it apparently doesn't:
gives
Notice that it is apparently allocating something on each loop iteration. (Same on 0.4 and 0.5.)
The text was updated successfully, but these errors were encountered: