[Rd] request: allow inline functions in R

elijah wright elw at stderr.org
Fri May 14 23:46:05 CEST 2004


> of Intel Itanium2 clusters for bioinformaticians to crank their data.

> optimizing their performance.  I'm using Intel C/C++ compiler on this
> platform running Linux.  One of my findings is that turning some
> functions in R to "inline" functions boost performance significantly.
>
> While R follows strict C89 standard right now, there're quite some good
> reasons to relax the rule somewhat.  From my experience in software

> In R, there are quite some simple functions that are called extremely
> often, such as "R_IsNaNorNA", "R_finite", etc.  They are used in heavy
> loops quite a lot.  They disrupt the pipelining, and negatively affect
> the performance of the software.  For instance, on IA64, system call of
> "isnan" cost 4 cycles, while a wrapper like "R_IsNaNorNA" could cost
> several times more.

if the Itanium2 optimizes badly for standard C89 code, that's the
processor architecture's fault, not R's.

you probably need either better (smarter) compilers or a different
platform, not 'improvements' to R.

what would the impact of inlining these functions be on all of the other
architectures (PPC, sparc, Opteron, x86, etc) where R currently runs
perfectly well?

--elijah



More information about the R-devel mailing list