[R] Question about building library and BLAS
Zhu Wang
zhuw at mail.smu.edu
Mon May 31 19:33:40 CEST 2004
On Mon, 2004-05-31 at 11:39, Douglas Bates wrote:
> I should have read your message more carefully. Those three Fortran
> routines that you mention are single precision and it would be silly
> to use them on modern computers. R only provides single precision
> floating point for compatibility. All numerical linear algebra is
> doing in double precision. Check where sgefa and sgesl are being
> called and see if they really need to be in single precision. I'm
> sure if you replace them by calls to dgefa and dgesl (and suitably
> change the precision of the arguments) they will run as fast as
> before.
Thanks. I have replaced sgefa and sgesl with dgefa and dgesl. The
results are confirmed by running the compiled Fortran code. I will
convey this to the original author.
> In fact you can probably use the Lapack routines dgetrf and
> dgetrs instead and get a performance boost.
I will try to improve later.
--
Zhu Wang
More information about the R-help
mailing list