search for: r_visnan

Displaying 2 results from an estimated 2 matches for "r_visnan".

Did you mean: r_isnan
2019 Sep 29
2
speed up R_IsNA, R_IsNaN for vector input
...ear R developers, I spotted that R_isNA and R_IsNaN could be improved when applied on a vector where we could take out small part of their logic, run it once, and then reuse inside the loop. I setup tiny plain-C experiment. Taking R_IsNA, R_IsNaN from R's arithmetic.c, and building R_vIsNA and R_vIsNaN accordingly. For double input of size 1e9 (having some NA and NaN) I observed following timings: R_IsNA 6.729s R_vIsNA 4.386s R_IsNaN 6.874s R_vIsNaN 4.479s ISNAN 4.392s It looks like R_vIsN(A|aN) are close to ISNAN (which just wraps to math.h::isnan). Should I follow up with a patc...
2019 Sep 30
0
speed up R_IsNA, R_IsNaN for vector input
...on is biased towards the case that such values are rare and that it is ok to sometimes say "there may be non-finite values" even when in fact they are not. Best Tomas > I setup tiny plain-C experiment. Taking R_IsNA, R_IsNaN from R's > arithmetic.c, and building R_vIsNA and R_vIsNaN accordingly. > For double input of size 1e9 (having some NA and NaN) I observed > following timings: > > R_IsNA 6.729s > R_vIsNA 4.386s > > R_IsNaN 6.874s > R_vIsNaN 4.479s > > ISNAN 4.392s > > It looks like R_vIsN(A|aN) are close to ISNAN (which just...