I'm working on an R package that uses Rcpp and RcppArmadillo, and I'm trying to profile one of the main functions in the package to improve its runtime.
I'm using gperftools as recommended by Dirk and specifically as described in this blog post. The top two function calls (by number of profiling samples) are called _Rf_cons
and _Rf_allocVector3
.
Total: 1881 samples
471 25.0% 25.0% 527 28.0% _Rf_cons
308 16.4% 41.4% 309 16.4% _Rf_allocVector3
Does anyone know what these functions are, and where they might be called from in Rcpp code? I can't find any references to them via google or in the Rcpp GitHub repo.
Thanks!