We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've been benchmarking some code and it would be nice to be able to turn off memoization. Something like memoize!(false) which sets a global switch.
memoize!(false)
The text was updated successfully, but these errors were encountered:
If that can be done without a performance impact, then sure...
Note that you can already achieve the same thing on your side with:
use_memoize = true struct OptionalMemoizer memo end haskey(om::OptionalMemoizer, key) = use_memoize ? haskey(om.memo, key) : false ...
and then use @memoize OptionalMemoizer(Dict() function ...
@memoize OptionalMemoizer(Dict() function ...
Another tack would be to run this interactively:
@eval Memoize macro memoize(fdef) esc(fdef) end Revise.revise(module_you_want_to_disable_memos)
Sorry, something went wrong.
No branches or pull requests
I've been benchmarking some code and it would be nice to be able to turn off memoization. Something like
memoize!(false)
which sets a global switch.The text was updated successfully, but these errors were encountered: