The fast assembling of stiffness and mass matrices is a key issue in isogeometric analysis, particularly if the spline degree is increased. We present two algorithms based on the idea of sum factorization, one for matrix assembling and one for matrix-free methods, and study the behavior of their computational complexity in terms of the spline order $p$. Opposed to the standard approach, these algorithms do not apply the idea element-wise, but globally or on macro-elements. If this approach is applied to Gauss quadrature, the computational complexity grows as $p^{d+2}$ instead of $p^{2d+1}$ as previously achieved.