Evaluate two expressions in the environment in which time_wrap is called, and record the system time associated with each expression.

time_wrap(expr1, expr2, units = "secs")

Arguments

expr1

first expression

expr2

second expression

units

time units with which to measure the system time of each expression (see difftime)

Value

list with three components: (1) time to evaluate the first expression, (2) time to evaluate the second expression, and (3) the time for the first expression divided by the time for the second

See also

Other compare: compare_grads(), compare_sims()