when bench::mark is stop??

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?

The tests are all equal in the final example as they are all empty data frames, so that is why there is no error stop, just a normal completion (after about 1second on my machine)

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.