There is some overhead of using lazy()
instead of substitute()
, however, on my computer it’s on the order of around 1.5µs, so it’s extremely unlikely to be a bottleneck in practice.
library(microbenchmark)
library(lazyeval)
microbenchmark(
substitute = substitute(x),
lazy = lazy(x)
)
#> Unit: nanoseconds
#> expr min lq median uq max neval
#> substitute 172 186 266 328 12807 100
#> lazy 1609 1691 1802 1981 68902 100