-
Notifications
You must be signed in to change notification settings - Fork 10
Lazy variables dict after delete. #97
Comments
MosekTools has a special linked list to have it more efficient than a Dict when you delete variables: |
@joaquimg do you have a sense of which operations are slow right now and on which solver? Because if you apply #95, #101, jump-dev/Clp.jl#57, most of the profiling I have done seems to indicate that the Julia code is no longer the bottleneck. Atleast when using Clp |
Clp and GLPK are much slower that Gurobi, CPLEX and Xpress. |
Why having a |
Yea but then the vector would grow a lot. |
Mosek also use a vector for mapping MOI index to Mosek column. It reuses columns but not MOI index. The MOIU Model also has vectors which as large as the number of variables created (including those deleted). We should not optimize the variable deletion case too much IMO. |
I think that addition should be as fast as possible and deletion should only come after. |
Currently we have a dict mapping variables to indices.
We only actualy need that onde a variable is deleted, before deletion the variable reference already have the correct index.
By implementing this we can bring back performance of JuMP 0.18 in many parts of the code, in models that do not require deletions.
The text was updated successfully, but these errors were encountered: