[Rcpp-devel] RcppArmadillo

Davor Cubranic cubranic at stat.ubc.ca
Tue Jun 15 20:41:09 CEST 2010


I've seen 2-10 times figure mentioned as a reasonable expectation for this. (I hit around 5-6x on my last few projects.)

Avoid calling back into R (i.e., Rcpp::Function) too frequently, because crossing that interpreter boundary carries a real price.

Also, if your R code is mostly staying inside its C library (e.g., matrix ops), rewriting it in Armadillo won't make much difference since it only speeds up a very thin outside layer.

Davor


On 2010-06-15, at 11:24 AM, Chuck Anderson wrote:

> I translated some R code I have for training neural networks into C++ using Armadillo and call it using RcppArmadillo.   It was great fun to see how Armadillo allows a pretty direct translation from R to C++.  However, I only see a speed up of 2 over the R execution time.  I expected much more. 
> What speed up do others see?  Any suggestions for finding execution bottlenecks in my Armadillo code? 
> Thanks,
> Chuck
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel



More information about the Rcpp-devel mailing list