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

Flow routing speed-up with Numba (5-10X faster) #25

Merged
merged 2 commits into from
Apr 26, 2024
Merged

Conversation

irbreeves
Copy link
Member

I put the overwash routing for an individual storm timestep into its own function and then use Numba to speed it up. Numba only works for functions with static parameters (can't use self). This change makes the model 5-10 times faster; the run_B3D_BMI script was taking ~25 seconds with the original code on my machine, but now takes ~3 seconds with this change.

@irbreeves irbreeves requested a review from anardek March 1, 2024 21:53
Copy link
Member

@anardek anardek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

baller

barrier3d/barrier3d.py Show resolved Hide resolved
barrier3d/barrier3d.py Outdated Show resolved Hide resolved
@irbreeves irbreeves requested a review from anardek April 26, 2024 23:04
@anardek anardek merged commit c99b859 into master Apr 26, 2024
2 of 17 checks passed
@anardek
Copy link
Member

anardek commented Apr 27, 2024

@avanblunk and @franklin1895, I would pull this most recent version into your branches

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

Successfully merging this pull request may close these issues.

2 participants