From elw at stderr.org  Fri May 14 23:46:05 2004
From: elw at stderr.org (elijah wright)
Date: Fri May 14 23:46:19 2004
Subject: [Rd] request: allow inline functions in R
In-Reply-To: <37342.130.223.128.12.1084543326.squirrel@expasy-ng.isb-sib.ch>
References: <37342.130.223.128.12.1084543326.squirrel@expasy-ng.isb-sib.ch>
Message-ID: <Pine.LNX.4.58.0405141642160.14370@illuminati.stderr.org>


> 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


[Rd] request: allow inline functions in R
elijah wright