On Sun, 29 Dec 2019, Sven Schreiber wrote:
Am 28.12.19 um 18:24 schrieb Allin Cottrell:
> On Sat, 28 Dec 2019, Sven Schreiber wrote:
>
>> A follow-up about the standalone SVD without a LS problem:
>>
>> Gretl uses DGESVD, while on
>>
https://www.netlib.org/lapack/lug/node32.html it says: "[DGESDD] is much
>> faster than [DGESVD] for large matrices, but uses more workspace."
>>
>> As I guess that nowadays workspace is not an issue anymore except in
>> extreme cases, this sounds as if this switch should be done as well, no?
>
> OK, that's in git. For now I've kept the old code alongside the new in
> case of any problems.
>
Hm, I'm not seeing any speedups (with the ridge package which uses the
svd() function) [...]
I'm seeing about 40 percent gain on this:
<hansl>
set verbose off
matrix X = mnormal(200,100)
X = X'X
matrix U
matrix V
set stopwatch
loop i=1..1000 -q
matrix s = svd(X, &U, &V)
endloop
printf "elapsed: %#gs\n", $stopwatch
matrix USV = (U .* s) * V
eval max(abs(X - USV))
</hansl>
For ease of comparison you can force use of the old code by putting
GRETL_OLD_SVD=1 into the environment.
Allin