-
Notifications
You must be signed in to change notification settings - Fork 8
Allow epi_slide
to access ref_time_value
#318
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
Allow epi_slide
to access ref_time_value
#318
Conversation
5d14ddd
to
8bfb4d8
Compare
There was some concern over the efficiency of finding In the old implementation, we were already doing a direct sort. I've just moved that step to be a littler bit later in the new version. So that step hasn't changed computational complexity of the function. In the new code here, we do need to identify dates not already in the The main addition, that is, something that could be slow that we're not already doing elsewhere in the |
Doing some benchmarking, the slow steps of the new approach are dropping the |
When testing that computations can access Opened issue #321 |
The input data
Looking at a computation that doesn't require access to
For this computation, the new code is ~2x slower. With larger data sizes, the difference in runtime gets smaller (new version ~30% slower with 50k rows). |
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.
Looks pretty good, and I like the more bite-size test data with more extensive tests! Major things that need action I think are:
- ungrouped case might have a bug
- merge with dev will probably break
- same tidyeval edge cases as Pass ref time value and group key to epix_slide for tidy computations #317
…al implmentation
I won't be able to finish the last few issues here before my PTO. Will pick those up when I get back. |
Need to update the documentation for the |
and add some unrelated comments regarding time value counting details. Since we're not potentially dealing with R6 objects, we can just us `as_data_mask(.x)`. We can also flatten the data mask by installing the `.x`, `.group_key` and `.ref_time_value` in the same way as that pronouns are installed (except keeping their original classes, not converting to pronouns), rather than using another level in the environment chain for the data mask.
An interesting performance experiment... I thought we might speed up things by changing
|
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.
Thanks for clearing up some of my confusion. I've applied some minor updates and am going to merge. Docs and NEWS might still need a little work; I'll try to tackle that in after the merge.
This implements Ryan's suggestion for how to calculate
ref_time_value
, and makes sureepi_slide
computations of all types can accessref_time_value
and the group key using the same approaches as in #313 and #317.I plan to remove the
n_mandatory_f_args
arg toassert_sufficient_f_args
in another PR.Closes #171.