Skip to content

speed up grid code paths #635

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

Merged
merged 2 commits into from
Mar 13, 2023
Merged

speed up grid code paths #635

merged 2 commits into from
Mar 13, 2023

Conversation

simonpcouch
Copy link
Contributor

Rewrites dplyr in main grid code path to use vctrs and tibble. :)

library(tidymodels)

bench::mark(
  fit =  fit_resamples(linear_reg(), mpg ~ ., bootstraps(mtcars, 100)),
  check = FALSE
)
#> # A tibble: 1 × 6
#>   expression      min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:expr> <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1 fit           4.51s    4.51s    0.222       51MB     4.44

With this PR:

#> # A tibble: 1 × 6
#>   expression      min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:expr> <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1 fit           3.96s    3.96s    0.252     47.7MB     4.29

Created on 2023-03-12 with reprex v2.0.2

@simonpcouch simonpcouch requested a review from hfrick March 13, 2023 01:48
@simonpcouch simonpcouch merged commit 7e823b6 into main Mar 13, 2023
@simonpcouch simonpcouch deleted the grid-speedup branch March 13, 2023 17:43
@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants