I am interested in solving a large number of small linear systems of equations, $Ax=b$, with $A$ either $2\times2$ or $3\times3$. Assuming none of these systems are actually singular, is there anything to deter me from forming $A^{-1}$ explicitly using Cramer's rule and computing $x=A^{-1}b$? The only things that comes to mind is possible loss of precision in the calculation of $\mathrm{det}A$. Can I expect any improvement over this naive approach by using a canned solver, e.g., LAPACK's dgesv
? Namely, would doing so reap numerical benefits that justify the overhead of calling out to LAPACK?
(I am open to methodologies in between these two extremes as well, e.g., hard-coding Gaussian elimination).