I was just wondering if it is recommended to compile functions in R (with the “compiler” package) for R-functions that are used in a production environment, in order to improve speed & efficiency.
According to this book, compiling functions may result in a modest speed boost:
However, I have found some conflicting info online when searching for this (some say it improves speed, other say it doesn’t matter anymore). Most articles I find about compiling R-functions appear to be quite old, so I feel this might be an outdated procedure.
Also, are there any reasons not to compile the functions, given that compiling increases speed? E.g. could the function become more unstable?