Closed rjoomen closed 4 months ago
Properly reserve SparseMatrix
Before:
After:
exprToEigen initialize from triplets
Before, lots of time spent in coeffRef():
After (now SparseVector is the remaining issue):
Create SparseVector from doublets
Before:
After (all below threshold):
Awesome! This was on my todo list.
I noticed significant inefficiencies in creating/updating constraints and costs. With some profiling using perf and hotspot I solved a number of issues leading to a nice speedup for problems with large numbers of variables.