CVX 2.0 Beta Slower than 1.0

I want to upgrade MATLAB beyond 2012b, but I have been held back because of the dependence of CVX 1.0 on cholinc, which disappeared from MATLAB after 2012b.

So I installed CVX 2.0 Beta. This solved the cholinc compatibility problem, but the code runs 2x slower, and speed is a significant issue. Is this expected behavior? Is there any workaround? Would you recommend an alternative such as using the ichol hacks suggested for CVX 1.0? Are there any other alternatives to speed up the code?

I am running a mean variance problem with constraints.


I’m sorry that CVX 2.0 is slower for you than 1.0. The “ichol” hacks are only one reason why this is so.

It’s important to keep in mind that the primary design objective of CVX is ease of use; speed is secondary, if that. Generally speaking, my only concern is that for models of medium-to-large size, the time spent in CVX’s overhead is less than the time spent in the solver. But I can’t possibly meet this goal for small models. There are too many fixed costs in CVX’s approach that do not scale with problem size. So for the smallest problems, CVX’s overhead is necessarily going to dominate. If you solve millions of small problems, CVX will be your bottleneck.

If you need speed, then, you need to jettison CVX and call the solver directly.

If you wish, consider editing your question here to include a self-contained example of a model that shows significant CVX overhead. Sometimes I do find sources of overhead that can be readily fixed; and if I do, I will fix them.

This is a reminder, I need to take CVX 2.0 out of “beta”. That ship sailed long ago :slight_smile: I run on a rapid release cycle anyway; the “beta” period was really meant to cover the new licensing functionality with professional solvers.