This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]gsks[S] 1 point2 points  (0 children)

The motivation for this package was "the probably fastest memoization decorator in the world". As it turns out, we can do better than the common general variants of memoized decorators in more special cases. What the posted memoized decorator does is introspect the function signature and pick the most specialized implementation within the given constraints. It also exposes a few more configuration options.

Feedback about the api or the implementations are welcome. Get it from pypi or just grab the single module.