Is it possible to reduce the computation time taken to find inverse of symbolic matrices USING CACHING TECHNIQUES accessible (if any)?
I am trying to compute inverse of symbolic matrices of size 12x12. I see that when the timing recudes drastically when I repeat the calculation.
For[i= 1, i <= 10, i++,
AbsoluteTiming[
K1inv = Simplify@Inverse[K1];
][[1]] // Print
]
gives output timings
21.6312373
2.9041661
1.2300704
1.2350706
1.2360707
1.2270702
1.2260701
1.2340706
1.2630723
1.3620779
Is there a way to USE the CACHING to speedup the computations of such matrices in general?
This link on SE points in that direction, but not answers the caching aspect
EDIT 1:
To be precise, the question is,
is there any predicatable takeaway from the caching - i.e. something that I can count on (in terms of time-saving)?
Is there anything I can do as a user to speedup further operations.
This question arises since I am not aware of how exactly caching helps - does it extend to only the EXACT SAME matrix (wherein memoization would solve it) OR does the caching speedup inversions of the SAME ORDER (i.e. for ANY other matrix of 12x12) OR would it speedup ANY ORDER less than the current order OR anything else ?
Inverse
but ratherSimplify
. $\endgroup$Method->"CofactorExpansion"
) then you have the ability to memoize (cache) all cofactors you construct. This can make for good speed. It might also dine on all your RAM and maybe gnash on your hard drive. $\endgroup$