Skip to content
Prev 7780 / 10988 Next

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

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