[R] No speed effect by using RcppArmadillo compared to R in matrix operations

Dirk Eddelbuettel edd at debian.org
Sat Oct 26 23:33:41 CEST 2013


Andreas Recktenwald <a.recktenwald <at> mx.uni-saarland.de> writes:
> another option if you're using Linux AND an Intel processor would be  
> linking R against Intel MKL (Math Kernel Library). Under Linux you can  

You do not have to "link" R against MKL. One simply builds and links R 
against _any_ BLAS implementation: reference BlAS, Atlas, GotoBLAS, 
OpenBLAS or MKL. (This assumes that you compiled R with the shared 
library option).

I have a package (and vignette / unfinished paper) on R-Forge which
implements a testing and timing comparison framework for this, using 
the fact that this is in fact plug&play -- look for 'gcbd' if interested.

Lastly, to come back to the OP's initial question, you are of course 
right. Armadillo calls the LAPACK / BLAS routines; so it ends up making
the same call as R does.  (Rcpp)Armadillo makes a lot of other 
transformations faster, but the core multiplication is about the same
as both R and Armadillo (and everybody else, apart from Eigen) "just" 
call the specialised BLAS. As one should.

Dirk



More information about the R-help mailing list