-
Notifications
You must be signed in to change notification settings - Fork 136
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorperformance 🏎️
Description
Starting with tibble 3.0.0, column subsetting using [[ is much slower than $. This causes slowdowns in functions that call [[ many times, for example data.matrix on a wide tibble.
df <- tibble::tibble(x = 1)
bench::mark(
dollar = df$x,
bracket = df[["x"]],
iterations = 1000
)
#> # A tibble: 2 x 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
#> 1 dollar 6.8us 8.1us 100956. 7.96KB 0
#> 2 bracket 190.3us 211.2us 3998. 165.09KB 12.0Created on 2020-06-03 by the reprex package (v0.3.0)
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorperformance 🏎️