Re: [R] very slow "memoise"

2018-11-15 Thread Jeff Newmiller
Yes, you have misunderstood what memoise is for. First, it is for when you call your function with the same inputs frequently as part of your calling-level algorithm. For your iterative calculation you would have a stuck (cycling) process if the same value of current were to be revisited... e

[R] very slow "memoise"

2018-11-15 Thread Martin Møller Skarbiniks Pedersen
Hi, I want to compute a lot of values and I have tried to use memoise::memoise to speed-up the computation. However it is much slower using the memoised version. I guess I have misunderstood how to use the package memoise or the purpose of the package. The code takes more than 2 minutes to f