Trying the same optimization on mat2/mat3.