automatically generated lagrangian allocates
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 839
- Forks
- 100
- Avg merge
- 20h 43m
- Merged PRs (30d)
- 38
Description
The automatically generated lagrangian allocates a lot of memory, killing performance
https://github.com/SciML/OptimizationBase.jl/blob/main/src/OptimizationDISparseExt.jl#L121C2-L137C12
It would be nice if it could use a cache instead of recreating the _res = zeros(eltype(x), num_cons) on each invokation
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading src/OptimizationDISparseExt.jl around lines 121-137, focusing on the automatically generated Lagrangian and its _res allocation. Check how repeated invocation currently recreates zeros(eltype(x), num_cons), then measure the allocation and performance impact. Done means repeated calls use an appropriate cache without changing the Lagrangian's results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100