-
Notifications
You must be signed in to change notification settings - Fork 322
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 #998: Speed up stumpi and aampi #1001
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1001 +/- ##
==========================================
+ Coverage 97.32% 97.33% +0.01%
==========================================
Files 89 89
Lines 14964 15027 +63
==========================================
+ Hits 14563 14626 +63
Misses 401 401 ☔ View full report in Codecov by Sentry. |
@seanlaw |
@NimaSarajpoor Please allow me some time to review it |
@NimaSarajpoor For completeness, are you able to provide some timings for the speedup (before and after your code changes) here in the comments? I trust that the code is indeed faster but at least we can document it here. |
@seanlaw
In the following table,
|
@NimaSarajpoor Can you tell me how you are computing "Speedup %"? The numbers don't look right to me. I think perhaps the wording should be "Percent Reduction" (i.e., I think Percent Speedup would be |
Right.... that is how I calculated the numbers.
Noted. I like this more as it is clearer. To avoid confusion for future readers who follow the comments, I am going to provide the tables with the new numbers below:
|
@NimaSarajpoor Considering that all of the existing tests are passing and the performance is improved, I feel pretty good about merging this. Do you think it's ready? Was there anything that you had doubts about? It looks like there's refactor of the code and then njit-ing that code |
Right. That's it!
My first concern is whether the added test function is clear. My second concern is regarding the comment I added for case 2 in the test function, i.e.
I think the comment above is slightly wrong. I think I need to make it clear that the updated profile is different than just doing
|
Okay, I will take a closer look. [Update] @NimaSarajpoor For the most part, I think case 1 is fine as it is looks like it is simply updating things by adding a single new data point. Having said that, I can't understand case 2. There seems to be too much happening and your intent isn't clear even with the comment(s). Also, you refer to
I think this is probably the most important thing to highlight. It sounds like this test is trying to make sure that your newly added function respects this point and does not ignore it. Is that right? And all of this is associated with I think it would make sense to split case 1 and case 2 into two separate tests with more specific names (i.e., the name of the first case can be kept but it seems like you are testing something more nuanced in the second case). |
I have the same feeling regarding case 2, which represents
My main point was to help future me remember why I used a particular approach for calculating
Noted. Please allow me to separate the cases, and revise the code. |
Exactly! Thank you for persisting |
@seanlaw |
@seanlaw |
@NimaSarajpoor I will take a look |
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.
@NimaSarajpoor I think the docstrings are fine. Do you think we are ready to merge?
I replaced
Thanks for checking that! So, feel free to merge it once all tests pass |
@NimaSarajpoor Thanks again for the wonderful contribution! |
See #998 .
_update_egress
method_update
method_update_egress
method_update
method