I have two variations of an iterative algorithm. All the steps of both algorithms are equivalent except one. In this step:
Algorithm 1 needs to compute the matrix $ABA^T$ for matrices $A \in \mathbb{R}^{p \times p}$ and $B \in \mathbb{R}^{p \times p}$;
Algorithm 2 needs to invert the $p \times p$ matrix $C$.
My question is: assuming that these steps led to the exact same iterates of the algorithm (i.e., they do not change the convergence properties), would there be any benefit to using Algorithm 1? If so, what?
As far as I can tell, Algorithm 1 requires only matrix multiples which can be easily parallelized. However, it's not clear to me that Algorithm 1 would be more memory efficient since one must compute and store $AB$ to then multiply it by $A^T$.
Edit: Assume that in general, these matrices are non-sparse.