Skip to content

What can be effectively implemented in R vs C/C++?

1 message · Dominick Samperi

#
I have found that many numerical algorithms run much more
quickly when implemented in C/C++ than when implemented
as an R function, and this is not surprising, of course, because
R is an interpreted language. In particular, recursive R functions
seem to run very slowly.

Are there any general guidelines about what can be
effectively implemented as an R function vs what is best
implemented in C/C++, with R used as a front-end?

Thanks,
ds