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

Straub fragmentation function optimization: avoid using Storage __getitem__ #976

Closed
slayoo opened this issue Dec 9, 2022 · 5 comments
Closed
Labels

Comments

@slayoo
Copy link
Member

slayoo commented Dec 9, 2022

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 (or PairwiseStorage in this case) which would do the copying using some backend code (njitted in the case of Numba CPU backend).

@slayoo slayoo pinned this issue Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Stale issue message

@edejong-caltech
Copy link
Collaborator

@slayoo Agreed we should address this for the sake of speeding up the code -- I don't feel that I understand the backend storage methods well enough to implement an njitted copying function. Is this something that you or @abulenok might be able to help with?

@slayoo
Copy link
Member Author

slayoo commented Feb 14, 2023

I suggest, we do it after merging #994 (and let's merge it ASAP)

@github-actions
Copy link

Stale issue message

@slayoo
Copy link
Member Author

slayoo commented Apr 18, 2023

this has been addressed in #1014

@slayoo slayoo closed this as completed Apr 18, 2023
@slayoo slayoo unpinned this issue Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants