marius311 / Memoization.jl

Easily and efficiently memoize any function, closure, or callable object in Julia.
MIT License
99 stars 2 forks source link

better/simpler rework of the get_cache internals #17

Closed marius311 closed 3 years ago

marius311 commented 3 years ago

Vastly simplifies how the get_cache machinery works, and removes some pretty borderline stuff we were doing before.

Basically, now, for top-level functions, at the time of the memoized definition, we defined a specialized get_cache which makes the lookup static. For everything else, we fall back to the generic (and dynamic) lookup.

Closes https://github.com/marius311/Memoization.jl/pull/16