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
Straub fragmentation function optimization: avoid using Storage __getitem__
#976
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seem to be a significant overhead in using constructs like:
https://github.com/atmos-cloud-sim-uj/PySDM/blob/ac01b4ea5e91f3045d9ba3acbe61c828ed42d589/PySDM/dynamics/collisions/breakup_fragmentations/straub2010.py#L50
which result in clling
Storage
__getitem__
millions of times in simulations like the 1D rainshaft one.A possible workaround would be to implement a method in
Storage
(orPairwiseStorage
in this case) which would do the copying using some backend code (njitted
in the case of Numba CPU backend).The text was updated successfully, but these errors were encountered: