> The array solution first computes the complete array ? > > My function is so expensive, and I do not know a priori > which arguments are needed at all, so precomputation of the complete > cache isn't tracktable. What is required a priori is to determine the range over which the function is to be memoised and the allocation of the appropriately sized array. You can modify the memoise function to just call the unmemoised function normally if the args are outside this array. Patrick.
- caching expensive functions Klemens Hemm
- Re: caching expensive functions Klemens Hemm
- Re: caching expensive functions Ch. A. Herrmann
- Re: caching expensive functions Klemens Hemm
- Re: caching expensive functions Patrick Sansom
- Patrick Sansom
