Rllvm and Compiler Packages: Compiling R

This is a pretty general question about the future of R: any hope of seeing a merger between compiler and Rllvm (from Omegahat) or another JIT compilation scheme for R (I know there is Ra, but it has not been updated recently)?

In my tests, the compiler gain is the limit for "complex" functions ...

+4
source share
2 answers

The important thing is not how complex the function is, but what kind of calculations it performs. The compiler will make a big difference for functions that are dominated by interpreter overhead, such as those that perform mostly simple operations on scalar or other small data. In such cases, I saw factor 3 for artificial examples and is slightly better than coefficient 2 for some production code. Functions that spend most of their time in operations implemented in native code, for example, in operations with linear algebra, will be of little use.

This is only the first release of the compiler, and it will evolve over time. LLVM is one of several possible areas that we will look at, but probably not for a while. In any case, I would expect using something like LLVM to provide further improvements in cases where the current compiler already matters, but does not add a lot in cases where it does not.

+11
source

(go from comment to answer ...)

This is more like a question for the r mailing list. Based on my general impressions, I would say, "Maybe not." Are your complex functions already based on highly vectorized (and therefore efficient) functions? I think that a more promising direction for not-so-easily-automatically optimized situations is the increased ease of implementation of C ++, etc. (T.E. Rcpp), if necessary, if necessary

+4
source

All Articles