Suppose I have the following simple function
void test(NumericMatrix some_mat){
}
When test is called, does Rcpp copy the entire some-mat
object instance onto the stack? I am wondering if it is better to pass parameters by reference to prevent copying the object on the stack. So is this a better way to do it?
void test(const NumericMatrix &some_mat){
}
Also, I am reading the source code for Rcpp on github. Where can I find the code of the proxy model for parameter passing?
Thanks for any advice.