-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
ENH: optimize get_value_opt
in class Function
#501
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #501 +/- ##
===========================================
- Coverage 71.17% 71.16% -0.02%
===========================================
Files 55 55
Lines 9277 9273 -4
===========================================
- Hits 6603 6599 -4
Misses 2674 2674
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Just sending the report made by @styris00 here so that all reviewers can see it. |
@styris00, can you share the code you used for your execution time reports? Specially the definition of the Function instances. |
I can't manage to send a python file so I put the code below. To perform the tests below and compare the two versions of
(You may have to also change the RocketPy import) Note that the matrix
|
TST: Add unit test for get_value_opt method
This report was really nice to read! Just wondering, what were the computer specification when running all the tests? (for example: i7-7200U, running python 3.10 on ubuntu jammy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! I'm happy seeing this speedup on the code.
Your work was amazing in this PR, thanks for contributions.
The table was created with an AMD Ryzen 7 6800H on Windows 11. If you've run these tests too, we wonder if you got roughly the same results ? |
Actually I didn't run the same tests, I am trusting on your analysis. |
I'm comfortable enough with this PR, I think you can merge it if you are comfortable too, or you can wait for another review if you think it's necessary. The PR's main goal was achieved. |
get_value_opt
in class Function
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest --runslow
) have passed locallyCurrent behavior
Calls to get_value_opt for shepard interpolation were slower.
New behavior
Calls to get_value_opt for shepard interpolation are quicker (using Numpy vectorized operations).
Breaking change