Closed njtierney closed 4 years ago
Just an update here, since the output of $
, and pull
and [[]]
aren't really the same:
library(bench)
library(ggplot2)
mb_1 <- mark(
"dplyr::select" = dplyr::select(iris, Sepal.Width),
"[]" = iris["Sepal.Width"]
)
summary(mb_1, relative = TRUE)
#> # A tibble: 2 x 10
#> expression min mean median max `itr/sec` mem_alloc n_gc n_itr
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 dplyr::select 106. 111. 110. 15.2 1 Inf 4 1
#> 2 [] 1 1 1 1 111. NaN 1 31.4
#> # ... with 1 more variable: total_time <dbl>
autoplot(mb_1)
Created on 2018-07-04 by the reprex package (v0.2.0).
Keep in mind that this is in microseconds (1 millionth of a second), but it might be interesting to explore