Skip to content
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

Easy performance improvements for vec_repeat() #1130

Closed
mgirlich opened this issue Jun 16, 2021 · 0 comments · Fixed by #1131
Closed

Easy performance improvements for vec_repeat() #1130

mgirlich opened this issue Jun 16, 2021 · 0 comments · Fixed by #1131
Labels
feature a feature request or enhancement vctrs ↗️

Comments

@mgirlich
Copy link
Contributor

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().

@hadley hadley added feature a feature request or enhancement vctrs ↗️ labels Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement vctrs ↗️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants