CLeARoboticsLab / MixedComplementarityProblems.jl

A custom interior point solver for mixed complementarity problems.
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Use in-place callbacks #13

Closed lassepe closed 1 month ago

lassepe commented 1 month ago

Currently, the code uses the out-of-place SymbolicUtils.build_function calls which causes extra allocations. It would be a good idea to allocate a buffer and write to it very round instead to keep the GC in check

dfridovi commented 1 month ago

Agreed. I saw how ParametricMCPs does this, but the SparseFunction bit didn't quite make sense to me since I am not as familiar with the sparse matrix formatting details. I'd love to hop on a call and knock this out together sometime soon.