Skip to content

Conversation

@DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Sep 24, 2025

cross::bench_versions(
  pkgs = c(
    # Main before doing any of these PRs
    "r-lib/vctrs@0279470c6de6ee2db3a9b333c198754080554ee7",
    # Current main
    "r-lib/vctrs",
    # This PR
    "r-lib/vctrs#2044"
  ),
  fn = \() {
    library(vctrs)
    x <- as.list(1:1e6)
    bench::mark(vec_ptype_common(!!!x), iterations = 200)
  }
)
# A tibble: 3 × 14
  pkg      expression    min median `itr/sec` mem_alloc `gc/sec` n_itr  n_gc total_time result
  <chr>    <bch:expr> <bch:> <bch:>     <dbl> <bch:byt>    <dbl> <int> <dbl>   <bch:tm> <list>
1 r-lib/v… vec_ptype… 41.1ms 41.7ms      24.0    7.63MB     5.99   160    40      6.68s <int> 
2 r-lib/v… vec_ptype… 35.1ms 35.7ms      27.7    7.63MB     6.93   160    40      5.77s <int> 
3 r-lib/v… vec_ptype… 28.9ms 29.5ms      33.5    7.63MB     8.37   160    40      4.78s <int> 
# ℹ 3 more variables: memory <list>, time <list>, gc <list>

@DavisVaughan DavisVaughan merged commit 8adffdf into main Sep 24, 2025
14 checks passed
@DavisVaughan DavisVaughan deleted the feature/shaped-ptype-improvements branch September 24, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants