What is the performance gap between Matlab fmincons and NLP C ++ solver like ipopt?

I am going to write algorthim for real-time applications that involve some high-dimensional NLP (non-linear programs).

before implantations, I need to configure my algorithm to see if this is possible for real-time applications, so I use the built-in fmincons Matlab as the baseline.

As experience shows, Matlab algorithms tend to vary from slower to slower than their C ++ counterparts, so I want to evaluate what performance increase I can expect in this particular case?

Since my work is mainly related to real-time applications, so I rarely use NLP (non-linear programming), so I asked my compatriots, they recommend that I try ipopt as a start, I googled on his site, there are no tests there against Matlab, and no there are a lot of questions regarding the details of their algorithms (at least in Matlab, it is easy to check the details of their algorithms), so I have almost no idea about accuracy / reliability / optimality, etc. oh he.

So any help here regarding NLP C ++ implants will be very helpful, thanks a lot in advance.

+6
source share
1 answer

In many such problems, large multiplications of O (n ^ ~ 3) matrices prevail. If this is the case, and both systems use the same algorithm, the performance will be similar and will not depend on the language, since the main matrix multiplication function will be implemented initially in asm anyway.

If the algorithm is not dominated by a simple function like this, and instead requires a lot of memory management, than the C ++ library will benefit a lot (3 to 10 times faster).

(If performance is critical, as many people use OpenCL for a GPU farm that develops for this type of numerical calculation, and has a price / performance difference in the range of 20-100x. Or you can compile it to a cluster if you need even faster .)

+2
source

All Articles