I'm comparing the run-time of the "qr" function:
Option1: R = triu(qr(A))
Option2: [~, R]=qr(A) (or [Q, R]=qr(A)),
Only the "R" output is required.
I've tested them on a large number of possible choices of A, a full (not-sparse) matrix with m >> n.
The result was a significant run-time advantage for triu(qr(A)).
To the best of my knowlegde from Matlab documention, option1 use LAPACK xGEQRF Householder Reflectors, but I couldn't find how option2 was implemented.
Can anyone explain what is (or may be) the cause for such performance difference?
(Using Matlab R2019b)
Thank you in advance!