speed up smatrix