search for: fun0

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

Did you mean: fun
2013 Jul 02
2
cache most-recent dispatch
Hi, S4 method dispatch can be very slow. Would it be reasonable to cache the most recent dispatch, anticipating the next invocation will be on the same type? This would be very helpful in loops. fun0 <- function(x) sapply(x, paste, collapse="+") fun1 <- function(x) { paste <- selectMethod(paste, class(x[[1]])) sapply(x, paste, collapse="+") } lst <- split(rep(LETTERS, 100), rep(1:1300, 2)) library(microbenchmark) microbenchmar...
2017 Apr 30
1
`match.call` and dots substitution
I'm noticing some interesting behavior in `match.call` in some corner-ish cases that arise when you try to use `match.call` to match a "grandparent" function and there are dots involved: fun0 <- function(a, ...) fun1(...) fun1 <- function(b, ...) fun2() fun2 <- function() match.call( fun1, sys.call(sys.parent()), expand.dots=FALSE, envir=parent.frame(2) ) fun0(1, 2, 3) ## fun1(b = 2, ... = pairlist(3)) fun0((1...
2015 Oct 30
0
match.call enhancements in 3.2.2
...? I ended up writing my own version that allows specification of the environment, but being able to rely on the built in R version seems much better.? That said, one issue remains as far as I can tell: if the `...` values are expressions they are substituted by `..1`, `..2`, etc.? For example: > fun0 <- function(...) { >?? fun_gpar <- function(b, ...) { >???? fun_par <- function(a) >?????? match.call(fun_gpar, sys.call(sys.parent()), envir=parent.frame(2L)) >???? fun_par() >?? } >?? fun_gpar(...) > } > fun0(999, 2 + 2, 3 * pi(), 4) Returns: > fun_gpar(b = 99...
2018 May 01
0
IPRA and conditionally reserved registers
...next i32 @foo(i16* nonnull %0, i32 signext 5) %6 = or i16 0, %4 %7 = or i16 %6, 0 store i16 %7, i16* undef, align 2 %8 = getelementptr inbounds i16, i16* %0, i64 5 %9 = load i16, i16* %8, align 2 store i16 %9, i16* %1, align 2 ret void } ; Function Attrs: nounwind define fastcc void @fun0(i8* nocapture readonly, i16* nocapture, i32 signext) unnamed_addr { %4 = alloca i8, i64 undef, align 8 call fastcc void @fun1(i16* nonnull undef, i16* %1) ret void } attributes #0 = { norecurse nounwind "no-frame-pointer-elim"="false" }