Skip to content

Conversation

DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Oct 9, 2025

cross::bench_versions(pkgs = c("rlang", "r-lib/rlang#1837"), {
  library(rlang)
  bench::mark(list2(), iterations = 1000000)
})
#> # A tibble: 2 × 7
#>   pkg              expression      min   median `itr/sec` mem_alloc `gc/sec`
#>   <chr>            <bch:expr> <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1 rlang            list2()       369ns    492ns  2022173.        0B    156. 
#> 2 r-lib/rlang#1837 list2()       123ns    246ns  3956898.        0B     95.0

cross::bench_versions(pkgs = c("rlang", "r-lib/rlang#1837"), {
  library(rlang)
  x <- 1
  y <- 2
  z <- 3
  bench::mark(list2(x, y, z), iterations = 1000000)
})
#> # A tibble: 2 × 7
#>   pkg              expression          min   median `itr/sec` mem_alloc `gc/sec`
#>   <chr>            <bch:expr>     <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1 rlang            list2(x, y, z)    779ns    902ns  1050766.        0B     143.
#> 2 r-lib/rlang#1837 list2(x, y, z)    492ns    656ns  1519305.        0B     176.

cross::bench_versions(pkgs = c("rlang", "r-lib/rlang#1837"), {
  library(rlang)
  x <- as.list(1:1e6)
  bench::mark(list2(!!!x), iterations = 1000000)
})
#> # A tibble: 2 × 7
#>   pkg              expression       min   median `itr/sec` mem_alloc `gc/sec`
#>   <chr>            <bch:expr>  <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1 rlang            list2(!!!x)    656ns    861ns  1069517.        0B     17.1
#> 2 r-lib/rlang#1837 list2(!!!x)    410ns    533ns  1673342.        0B     16.7

Comment on lines +401 to +403
// Deprecated
R_RegisterCCallable("rlang", "rlang_env_dots_list", (DL_FUNC) &rlang_env_dots_list);
R_RegisterCCallable("rlang", "rlang_env_dots_values", (DL_FUNC) &rlang_env_dots_values);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deprecated both of these because vctrs is the only one using them, and now we don't use either

@DavisVaughan DavisVaughan requested a review from lionel- October 9, 2025 17:29
@DavisVaughan DavisVaughan merged commit 9dd9ab8 into main Oct 14, 2025
13 checks passed
@DavisVaughan DavisVaughan deleted the feature/list2-specialization branch October 14, 2025 15:27
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