-
Notifications
You must be signed in to change notification settings - Fork 132
Remove bottlenecks for styler #348
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #348 +/- ##
==========================================
+ Coverage 87.43% 91.61% +4.18%
==========================================
Files 24 23 -1
Lines 1122 1050 -72
==========================================
- Hits 981 962 -19
+ Misses 141 88 -53
Continue to review full report at Codecov.
|
Ok cool. Need to check how much performance styler gains through these optimizations. |
R/tbl-df.r
Outdated
if (!exact) { | ||
warningc("exact ignored") | ||
} | ||
if (missing(j)) { | ||
return(unclass(x)[[i]]) |
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.
@lionel-: Is there a helper for unclass(x))[[i]]
in rlang?
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.
Not yet, maybe you can use .subset2()
?
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.
Of course, thanks!
I just ran |
I'm thinking that the purrr compats should use purrr's C implementation to avoid the slowdown. It doesn't cost a lot to compile a little embedded C file. |
Maybe move the elementary purrr functions to rlang, CC @hadley? I've seen some slowdown due to rlang's very careful input checking. I'm really looking forward to the C implementation of the |
sorry, it's planned but I haven't had time to do it yet :( Expression capture and interpolation got a lot faster though, and I'll finish porting |
Most of rlang will be implemented in C eventually. |
Thanks for the heads up, I really appreciate your work on rlang! |
Cool 😊 |
Should we require a minimal version of tibble for styler to make sure the speed improvements take effect? Probably not, right? |
I think it's reasonable to require it |
I'm using |
Now running ~3x faster on the tidyr package (60s -> 20s), CC @lorenzwalthert.