General purpose efficient memoization
The common general versions of memoized decorators (, , ) are often good enough but they incur some overhead that can be avoided in more special cases (). This package exposes a single callable, memoized, that picks an efficient memoization implementation based on the decorated function’s signature and a few user provided options. The included benchmark file gives an idea of the performance characteristics of the different possible implementations.
Additionally, memoized allows:
More options for customization and optimization may be added in the future.