I need to evaluate a function (posterior distribution) which requires long loops. Clearly I don\'t want to do this within R itself, and so I\'m using \"inline\" and \"Rcpp\
You are calling an R function from Rcpp.
That cannot be faster than calling the R function directly.
Your binding constraint is the function you call and not how you call it. Rcpp is not some magic R-to-C++ compiler.