TITLE: Time complexity of quadratic programming
QUESTION [6 upvotes]: I am using the Matlab built-in quadprog to solve a quadratic program with linear constraints. I vaguely recalled from school that the time complexity of quadratic programming should be $O(n^3)$, and I assume n refers to the number of decision variables. However, when I experimentally compute the execution time as a function of the number of variables in Matlab, the execution time actually increases less than linearly with more variables. Increasing the number of variables from 10 to 100 only increases the execution time by 5 times. I am very puzzled by this result and perhaps what I remembered is wrong. Can anyone shed some light on the time complexity of quadratic program in theory and in practice?

REPLY [8 votes]: Time complexity of Quadratic Programming.
It was proved by Vavasis at 1991 that the general quadratic program is NP-hard, i.e. it takes more than polynomial time to be solved "exactly" (in reality, its impossible to find an exact solution due to the finite precision arithmetic of the computer). If your QP is convex, there are polynomial time interior point algorithms (e.g. Ye and Tse at 1989 published an extension of Karmarkar's projective algorithm on convex quadratic programs).
Also, there are approximation algorithms that return local solutions of nonconvex QPs in polynomial running time (e.g. Ye, 1998).
About quadprog's inner implementation and time-complexity.
Quadprog runs an active-set method (of exponential time-complexity for the worst case input instances) for a general QP. For a really hard QP (indefinite, with a near badly scaled Q matrix) , it may not converge to a solution. In the case that your input's QP is convex, quadprog runs an interior-point method. 
I didn't ever check quadprog's time complexity in practice, but you can't lead to an inference by just observing the running times as you scale the dimension of a given QP. It's better to generate a test set, consisting of convex and not-convex QP, manually choose the algorithm you want to be runned by quadprog for each of them, and observe the running times.