optimizing cholesky