Alternatively, if you actually wanted to keep the 0.95 you could use
usage > R_CStackLimit - (R_CStackLimit >> 4)
and probably get close enough to 0.95 as it makes no difference or go
with 5 and get something more like 97%. At any rate, you'd avoid
floating point.
On 8/29/07, Stephen Milborrow <
Greetings R developers,
R will run a little faster when executing "pure R" code if the function
R_CheckStack() is modified.
With the modification, the following code for example runs 15% faster
(compared to a virgin R-2.5.1 on my Windows XP machine):
N = 1e7
foo <- function(x)