Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memoize_in is possibly too heavyweight for geometric quantities, we could directly use a dict #147

Open
inducer opened this issue Jul 5, 2021 · 2 comments

Comments

@inducer
Copy link
Owner

inducer commented Jul 5, 2021

Here's some data from a similar test run as the one described in #146 (comment):

grafik

I've circled the bits that are connected to @memoize_in.

cc @thomasgibson @lukeolson

@thomasgibson
Copy link
Collaborator

Could you elaborate what you mean by "we could directly use a dict"?

@inducer
Copy link
Owner Author

inducer commented Aug 13, 2021

Literally:

try:
    return my_cache_dict[key]
except KeyError:
    # compute the thing
    my_cache_dict[key] = the thing
    return the thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants