-
Notifications
You must be signed in to change notification settings - Fork 9
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
Remove allocations in FeasibilityFormNLS
#77
Comments
After #90 , only
|
Are you saying that others don’t allocate when you create a view? Isn’t it the view itself that allocates? Julia> @allocated view(x, 1:15)
48 |
From my understanding, views of connected indices shouldn't allocate. You are right in your example, but this:
|
Sure, but that’s not really what you’re doing above with julia> function fun(x) x .= 2; return nothing end
fun (generic function with 1 method)
julia> x = ones(50);
julia> @allocated fun(x)
1072856
julia> @allocated fun(x)
0
julia> @allocated fun(view(x, 1:15))
3420376
julia> @allocated fun(view(x, 1:15))
48 |
Ok, I see, so the problem would be solve if we had re-implemented After,
the allocation is 0. |
I run the following script:
and it returns
so there is potentially the following list to handle:
cons_nln
Save allocationscons_nln
inFeasibilityFormNLS
#76cons!
(most likely connected tocons_nln
)jtprod_nln!
jtprod!
hprod!
jprod!
jac_nln_structure!
The text was updated successfully, but these errors were encountered: