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

fix: use xreplace in prepare_caching() #403

Merged
merged 5 commits into from
Jan 25, 2022

Conversation

redeboer
Copy link
Member

@redeboer redeboer commented Jan 25, 2022

Previously, prepare_caching() (which is used by create_cached_function()) substituted fixed parameter values with subs(), which can be slow in case of larger expressions. The function now uses xreplace() instead.

Also improved the docstrings of both functions, preview here.

@redeboer redeboer added 🐛 Bug Something isn't working 📝 Docs Improvements or additions to documentation labels Jan 25, 2022
@redeboer redeboer added this to the 0.4.2 milestone Jan 25, 2022
@redeboer redeboer self-assigned this Jan 25, 2022
@redeboer redeboer enabled auto-merge (squash) January 25, 2022 17:04
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@redeboer redeboer enabled auto-merge (squash) January 25, 2022 17:22
@redeboer redeboer changed the title fix: use xreplace in create_cached_function() fix: use xreplace in prepare_caching() Jan 25, 2022
@redeboer redeboer merged commit b1fecc4 into ComPWA:main Jan 25, 2022
@redeboer redeboer deleted the speed-up-create_cached_function branch January 25, 2022 17:28
@redeboer redeboer changed the title fix: use xreplace in prepare_caching() fix: use xreplace in prepare_caching() Apr 11, 2022
@redeboer redeboer changed the title fix: use xreplace in prepare_caching() fix: use xreplace in prepare_caching() Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working 📝 Docs Improvements or additions to documentation
Projects
Status: Released
Development

Successfully merging this pull request may close these issues.

1 participant