Skip to content

Easy performance improvements for vec_repeat() #1130

Closed

Description

@mgirlich

vec_repeat() currently uses a combination of rep() and vec_slice(). It can be easily be made quite a bit faster by using vctrs::vec_rep() and vctrs::vec_rep_each().
This gives a nice speed up for expand_grid(), pivot_longer(), and pivot_wider().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions