This is just an internal utility included in the package which is not designed to be accurate. If you need accurate benchmarks, you should take a look at the microbenchmark and bench R packages.
benchmarkito(..., times = 100, rand_ord = TRUE)
... | List of expressions to benchmark. |
---|---|
times | Integer scalar. Number of replicates. |
rand_ord | Logical. When |
A data frame of class ergmito_benchmark
with times
rows and the
following columns:
id
Integer. Id of the expression.
expr
Factor. Expression executed.
user.self
, sys.self
, elapsed
, sys.child
time in seconds (see proc.time()
).
Includes the following attributes: ncalls
, call
, label
, and expr
.
The print method prints a summary including quantiles, relative elapsed times, and the order (fastest to slowest).
print(bm)#> call: #> benchmarkito(exp(1:1e+05), sqrt(1:1e+05), times = 20) #> #> Times (in seconds, see proc.time()): #> #> label user.self sys.self elapsed user.child sys.child 5% 50% #> 1 exp(1:1e+05) 0.00105 7e-04 0.00170 0 0 0.001 0.002 #> 2 sqrt(1:1e+05) 0.00075 3e-04 0.00105 0 0 0.000 0.001 #> 95% relative ord #> 1 0.00200 1.619048 2 #> 2 0.00125 1.000000 1