[Rcpp-devel] Comparison of R and rcpp for backsolve

Colin Rundel rundel at gmail.com
Sat Jun 28 07:05:10 CEST 2014


I do believe that arma uses the correct back solve when everything is called correctly (I haven’t profiled the code recently to check what BLAS functions are being called though). I get better performance from Rcpp than R when I change the back solve line to be

RI = solve(trimatu(R_upptri),I);

I’m not familiar enough with the arma internals to figure out why the current code doesn’t preserve the triangular matrix designation. Note that it is also possible to implement the back solve using the inv function which avoids the need to allocate the identity matrix.

-Colin


More information about the Rcpp-devel mailing list