bench-package | R Documentation |
Tools to accurately benchmark and analyze execution times for R expressions.
Maintainer: Davis Vaughan davis@posit.co
Authors:
Jim Hester
Other contributors:
Drew Schmidt (read_proc_file implementation) [contributor]
Posit Software, PBC [copyright holder, funder]
Useful links:
Report bugs at https://github.com/r-lib/bench/issues
dat <- data.frame(x = runif(10000, 1, 1000), y=runif(10000, 1, 1000))
# `bench::mark()` implicitly calls summary() automatically
results <- bench::mark(
dat[dat$x > 500, ],
dat[which(dat$x > 500), ],
subset(dat, x > 500))
# However you can also do so explicitly to filter gc differently.
summary(results, filter_gc = FALSE)
# Or output relative times
summary(results, relative = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.