Calling an R function using inline and Rcpp is still just as slow as original R code

前端 未结 1 392
孤城傲影
孤城傲影 2020-11-30 15:12

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\

相关标签:
1条回答
  • 2020-11-30 15:54

    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.

    0 讨论(0)
提交回复
热议问题