WIP: tibble_reconstruct(), tibble_row_slice(), tibble_col_modify()#937
Open
WIP: tibble_reconstruct(), tibble_row_slice(), tibble_col_modify()#937
Conversation
Member
Author
|
Unfortunately, this is very slow -- I see a slowdown of a factor of 3 for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #890.
This PR makes use of new functions
tibble_reconstruct(),tibble_row_slice()andtibble_col_modify()that are (almost) identical to the data frame methods of the correspondingdplyr_*()generics. I hope I have caught all instances where these operations should happen.From there I see two paths:
tibble_*()generics that will be called from dplyr's default method.It seems that
dplyr_col_modify()is inefficient, because it performs repeated lookup of column names in its assignment loop. In tibble, we already know the numeric indices, because we check thoroughly beforehand. I will try to gauge the impact on the performance so that we can make an informed decision.@jennybc @DavisVaughan @lionel-: Is this something that should be discussed in a tidyup?