Eliminated explicit creation of intermediate matrix in sa_emin