Displaying 1 result from an estimated 1 matches for "gcm1".
Did you mean:
gcm
2012 Apr 26
2
Memoize and vectorize a custom function
...I want to vectorize it. Should be easy, right?
Apparently, I must have the wrong mindset for using the `memoise` or
`R.cache`
R packages:
> system.time(dummy <- sapply(rep(seqs,100), GC))
user system elapsed
0.044 0.000 0.054
>
> library(memoise)
> GCm1 <- memoise(GC)
> system.time(dummy <- sapply(rep(seqs,100), GCm1))
user system elapsed
0.164 0.000 0.173
>
> library(R.cache)
> GCm2 <- addMemoization(GC)
> system.time(dummy <- sapply(rep(seqs,100), GCm2))
user system elapsed...