I learned that the bench will stop without comparison for different outputs.
dat <- data.frame(x = runif(10000, 1, 1000),
y=runif(10000, 1, 1000))
bench::mark(
dat[dat$x > 500, ],
dat[which(dat$x > 499), ],
subset(dat, x > 500)
)
However, the code below did not stop it.
dat <- data.frame(x = rnorm(10000, 30, 10),
y = rnorm(10000, 20, 4))
bench::mark(
dat[dat$x > 500, ],
dat[which(dat$x > 499), ],
subset(dat, x > 500)
)
When will it stop? Why didn't it stop?