I have solved a system of linear equations using both Gauss Pivot and Scipy.linalg.solve. I have been told that the gaussPivot function I am using, uses n^3/3 multiplications and n^2/2 summations in total. I was just wondering if there was a way to find out how many multiplications/summations the linalg.solve use just to see if it has better performance than gaussPivot
Asked
Active
Viewed 246 times
0
-
Benchmark it! And if you really want to look at algorithmic complexity (which might be less relevant compared to SIMD and Cache-optimizations), start looking at LAPACK (which is used). – sascha Nov 05 '17 at 14:52
-
1I think this is a duplicate of [Q12660052](https://stackoverflow.com/q/12660052/4950339) – percusse Nov 05 '17 at 17:32
-
Possible duplicate of [Time complexity of scipy.linalg.solve (LAPACK gesv) on large matrix?](https://stackoverflow.com/questions/12660052/time-complexity-of-scipy-linalg-solve-lapack-gesv-on-large-matrix) – sascha Nov 05 '17 at 19:22
-
Thank you for your help. I have seen that the scipy.linalg.solve has O(n^3), does this mean that it has the same amount of summations and multiplications as the gaussPivot code that uses n^3/3 multiplications and n^2/2 summations in total. (the gaussPivot code was also denoted O(n^3) – George Nov 05 '17 at 23:36