Most Efficient Way to Compute a Quadratic Matrix Form

I have asked something similar recently (Efficient approach to multiply three matrices (M1*M2*M3) and two vectors and a matrix (x*M*y)).