repair trunk: octave suffered from CRTP
Faster matrix product for diagonal matrices