On Sat, 28 Dec 2019, Sven Schreiber wrote:
Am 28.12.2019 um 16:42 schrieb Sven Schreiber:
> Am 28.12.2019 um 05:06 schrieb Allin Cottrell:
>> It appears to be a free lunch, pretty much. The speed-up is significant
>> but not huge, something like 30 percent. That's now in git.
>
> A follow-up about the standalone SVD without a LS problem:
OK sorry about this flood of postings, but there might be more.
1) Eigenvalues: An analogous situation to the SVD apparently exists for
eigenvalue problems: Gretl uses DSYEV, but there are also DSYEVD and
DSYEVR. On
https://www.netlib.org/lapack/lug/node30.html it says again:
"[DSYEVD] is much faster than [DSYEV] for large matrices, but uses more
workspace."
Trying DSYEVD would be fairly straightforward. (Though none of these
alternative functions are simply drop-in replacements for the more
basic versions.)
But then there's also a third competitor: "[RRR / DSYEVR] is
the fastest
algorithm of all (except for a few cases), and uses the least
workspace." Sounds almost like a no-brainer.
Almost... except that its signature is pretty different from the
others, and kinda awkward. It would be a bigger job to make use of
it for our eigensym. This is actually a gripe of mine about the
fancier "alternative" lapack functions. Fair enough to add an
argument or two as needed (as in DGESDD vs DGESVD) but not so nice
to change the semantics of existing arguments, which I think could
probably be avoided.
2) Complex stuff; I looked in lib/src/gretl_cmatrix.c for Lapack
routines used. Short summary:
-) ZHEEV: as with DSYEV; use ZHEEVD or ZHEEVR instead
-) ZGESVD: as with DGESVD; use ZGESDD instead
OK, worth looking at those too.
Allin