This is for 5 test points.
The question of how to speed up generic operations for fixed sizes matrices can be an important one. This one comes from here
I have a 2x2 linear algebraic system to be solved at each step of an iterative process. Julia code profiling shows that
linalg/dense.jl; \; line: 448
takes the most run time (from my A\b call), probably calling LU decomposition from lapack. Is there any way to speed up the calculation specifically due to such a small system size? I could of course use exact solution (also saving memory allocation by not forming arrays) but numerical issues matter for a few ways to write it (potential instability). There is no a priori knowledge about specifics of the matrix (could sometimes be close to singular). Any suggestions for performance enhancements?
A response was to look here
implement the suggested algorithm in a programming language of your choice including the part on improving accuracy. I can help if you choose to bite the bullet with Julia.
Compare the result to that using an LU decomposition.