SVD computation time question

4 views (last 30 days)
I'm measuring computation time of matrix factorization methods for wide matrices with increasing number of columns.
I don't understand why SVD computation time starts growing very sharply between the 25th and 30th iteration. I'm using the built-in svd() function, so my guess would be that for larger matrices there is another method used for computing SVD.
I'm not sure if this is the right reason so I'm checking here if anyone can confirm or if there is anything else to it.

Accepted Answer

Christine Tobler
Christine Tobler on 29 Apr 2024
I'm not sure what causes the sharp change between iterations - I can reproduce roughly similar timings when I call svd with 3 outputs, not using the "econ" mode.
For this size of inputs, most time will be spent on computing the third output matrix, so quadratic time increase should be expected with the number of iterations. I do not believe there are different algorithms are used here, but different block sizes for splitting up the problem might be part of the reason her, or also some hardware-dependent memory or cache effects.
If it's possible to do your computation using the economy mode output of SVD, this would likely improve performance significantly.

More Answers (0)

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!