Subject: lapackers
List archive
- From: Daniel Kressner <daniel.kressner@sam.math.ethz.ch>
- To: lapackers <lapackers@cs.berkeley.edu>, lapackers <lapackers@cs.utk.edu>
- Subject: [lapackers] Performance of _LARTG
- Date: Thu, 11 Jun 2009 15:58:22 +0200
- Priority: normal
Dear LAPACKers,
since version 3.1 the DATA/SAVE statements for machine constants
in _LARTG have been removed for thread safety, implying that the machine
constants are recomputed *every* time _LARTG is called. This creates
quite some overhead in routines that intensively use Givens rotations.
For example on my machine (Intel Core2 with Goto BLAS and
LAPACK 3.2), the symmetric QR algorithm for computing the eigenvalues
of a 1000x1000 matrix requires 0.33 seconds. With a modified
version of _LARTG, where the machine constants are passed as
input parameters,
SUBROUTINE _LARTG2( F, G, CS, SN, R, SAFMN2, SAFMX2 )
the execution time reduces to 0.10 seconds. Thus, 2/3 of the time is
spent on calls to _LAMCH. I am aware that the QR algorithm is
probably not the first choice to compute the eigenvalues of a
symmetric matrix but there might be other algorithms that could
benefit from a modified version of _LARTG that avoids the
computation of machine constants.
Daniel
- [lapackers] Performance of _LARTG, Daniel Kressner, 06/11/2009
Archive powered by MHonArc 2.6.16.