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 162 210 266 327 5498 100
#> lazy 1538 1608 1710 1885 41125 100