[R-sig-Debian] optimized linear algebra library on Lenny
tyler
tyler.smith at mail.mcgill.ca
Wed May 28 16:31:14 CEST 2008
On Wed, May 28, 2008 at 02:14:03PM +0000, Dirk Eddelbuettel wrote:
> On Wed, May 28, 2008 at 10:52:45AM -0300, tyler wrote:
> >
> > I'd like to install the optimized libraries on my Thinkpad with an Intel
> > Core Solo chip, which apparently supports the following instruction
> > sets: MMX, SSE, SSE2, SSE3 instruction sets, XD-Bit.
> >
> > Is it as simple as:
> >
> > apt-get install libatlas3gf-sse2
> >
> > And is there anything else that needs doing to tell R to use the new
> > libraries?
>
> No, everything else is automatic. See the (Debian-specific) README
> below /usr/share/doc/libatlas*/
>
> It's always instructive to run a test such as (taken from README.Atlas
> below /usr/share/doc/r-base-core/ -- and I need to update package
> names therein)
>
> $ R --vanilla -q
> > mm <- matrix(rnorm(10^6), ncol = 10^3)
> > system.time(crossprod(mm))
> [1] 28.28 0.08 33.54 0.00 0.00
> >
>
Done. The results are impressive:
Before:
-> R --vanilla -q
> mm <- matrix(rnorm(4*10^6), ncol = 10^3)
> system.time(crossprod(mm))
user system elapsed
12.836 0.012 13.327
>
After:
-> R --vanilla -q
> mm <- matrix(rnorm(4*10^6), ncol = 10^3)
> system.time(crossprod(mm))
user system elapsed
3.236 0.028 3.268
>
Thanks!
Tyler
--
Philosophy of science is about as useful to scientists as ornithology is to birds.
--Richard Feynman
More information about the R-SIG-Debian
mailing list