patch to speed up LinearAlgebra module

I've uploaded a patch to LinearAlgebra.py and lapack_litemodule.c that speeds up some computations (svd, linear least-squares, and hermitian eigenanalysis) by 3-5 times when linking with external (preferably optimized) blas and lapack libs. The patch replaces calls to dgesvd, dgelss and dsyev with the newer, faster lapack routines dgesdd, dgelsd and dsyevd. Here are my timing results before and after (G4 350mhz powermac, optimized ATLAS blas lib and lapack 3.0 from netlib.org): Before: svd of 1000X1000 matrix takes 609.19 generalized inverse of 1000X1000 matrix takes 744.36 linear least-squares solution of 1000X1000 matrix takes 451.68 eigenvectors of 1000X1000 symmetric matrix takes 210.08 After: svd of 1000X1000 matrix takes 142.55 generalized inverse of 1000X1000 matrix takes 237.08 linear least-squares solution of 1000X1000 matrix takes 81.91 eigenvectors of 1000X1000 symmetric matrix takes 56.23 Note that since these newer lapack routines are not in lapack_lite, you must link external blas and lapack3 libs. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/CDC R/CDC1 Email : jsw@cdc.noaa.gov 325 Broadway Web : www.cdc.noaa.gov/~jsw Boulder, CO, USA 80303-3328 Office : Skaggs Research Cntr 1D-124
participants (1)
-
Jeff Whitaker