I have these functions that make some (vectorized) date computation on pairs of (vector-)inputs. Since I apply these functions millions of times in loops I need them to be extra effficient. However, memoise treats the full vector as one input, and thus I do not benefit from the caching.
Could there in principle be a vectorised memoise, maybe called differently ?
It is not quite deduped, though it would benefit from it, since deduped does not remember values in between successive calls.
I have these functions that make some (vectorized) date computation on pairs of (vector-)inputs. Since I apply these functions millions of times in loops I need them to be extra effficient. However,
memoisetreats the full vector as one input, and thus I do not benefit from the caching.Could there in principle be a vectorised
memoise, maybe called differently ?It is not quite
deduped, though it would benefit from it, sincededupeddoes not remember values in between successive calls.