search for: do_stuff_with_x

Displaying 4 results from an estimated 4 matches for "do_stuff_with_x".

2014 Dec 03
2
we need an exists/get hybrid
...t;). Michael Lawrence and I worked out that we need a function that returns either the desired object, or something that represents R_UnboundValue. We also need a very cheap way to check if something equals this new R_UnboundValue. This might look like if (defined(x <- fetch(symbol, env))) { do_stuff_with_x(x) } A few more thoughts about "exists": Moving the bit of R in the exists function to C saves 10% of the time. Dropping the redundant pos and frame args entirely saves 30% of the time used by this function. I suggest that the arguments of both get and exists should be simplified to (x,...
2014 Dec 03
2
we need an exists/get hybrid
...eed a function that returns either the desired object, or something > > that represents R_UnboundValue. We also need a very cheap way to check if > > something equals this new R_UnboundValue. This might look like > > > > if (defined(x <- fetch(symbol, env))) { > > do_stuff_with_x(x) > > } > > > > A few more thoughts about "exists": > > > > Moving the bit of R in the exists function to C saves 10% of the time. > > Dropping the redundant pos and frame args entirely saves 30% of the time > > used by this function. I suggest t...
2014 Dec 03
0
we need an exists/get hybrid
...worked out that > we need a function that returns either the desired object, or something > that represents R_UnboundValue. We also need a very cheap way to check if > something equals this new R_UnboundValue. This might look like > > if (defined(x <- fetch(symbol, env))) { > do_stuff_with_x(x) > } > > A few more thoughts about "exists": > > Moving the bit of R in the exists function to C saves 10% of the time. > Dropping the redundant pos and frame args entirely saves 30% of the time > used by this function. I suggest that the arguments of both get and &...
2014 Dec 04
0
we need an exists/get hybrid
...ther the desired object, or something > > > that represents R_UnboundValue. We also need a very cheap way to check > if > > > something equals this new R_UnboundValue. This might look like > > > > > > if (defined(x <- fetch(symbol, env))) { > > > do_stuff_with_x(x) > > > } > > > > > > A few more thoughts about "exists": > > > > > > Moving the bit of R in the exists function to C saves 10% of the time. > > > Dropping the redundant pos and frame args entirely saves 30% of the > time > >...