Efficient evaluation of matrix polynomials