search for: tmp_prot_sexp

Displaying 1 result from an estimated 1 matches for "tmp_prot_sexp".

2010 Aug 23
1
Speed improvement to PROTECT, UNPROTECT, etc.
...call overhead, without generating lots of extra code, one can redefine the macros to handled to the common case inline, and call the function in memory.c for the uncommon cases (eg, error on stack underflow). Here are my versions that do this: #define PROTECT(s) do { \ SEXP tmp_prot_sexp = (s); \ if (R_PPStackTop < R_PPStackSize) \ R_PPStack[R_PPStackTop++] = tmp_prot_sexp; \ else \ Rf_protect(tmp_prot_sexp); \ } while (0) #define UNPROTECT(n) (R_PPStackTop &gt...