This article presents a comparison between dense and sparse model predictive control (MPC) formulations, in the context of walking motion generation for humanoid robots. The former formulation leads to smaller, the latter one to larger but more structured optimization problem. We put an accent on the sparse formulation and point out a number of advantages that it presents. In particular, motion generation with variable center of mass (CoM) height, as well as variable discretization of the preview window, come at a negligible additional computational cost. We present a sparse formulation that comprises a diagonal Hessian matrix and has only simple bounds (while still retaining the possibility to generate motions for an omnidirectional walk). Finally, we present the results from a customized code used to solve the underlying quadratic program (QP).