Skip to content
Prev 2109 / 21312 Next

[Bioc-devel] R_CheckUserInterrupt guidelines (was Re: R_CheckUserInterrupt in IRanges)

This is a bit off-topic but one idiom that I see in this code is the
use of INTEGER() or REAL() inside potentially long loops.  This is not
a good idea.  In packages INTEGER(), REAL(), etc. are implemented as
functions, not macros.  It is best to assign a pointer outside the
loop and work with that, avoiding the function call overhead.  I
realize this could be a minuscule change but if what you do with that
pointer within the loop is trivial it is best not to add the function
call overhead.
On Tue, Jan 12, 2010 at 2:26 AM, Robert Castelo <robert.castelo at upf.edu> wrote: