timing: timing

Description Usage Arguments Value Examples

Description

The timing function is used alongside the WFG package. It estimates the number of evaluations per second.

Usage

1
timing(expr, maxSeconds = 4)

Arguments

expr

The expression to be timed.

maxSeconds

The maximum number of seconds you want to wait for the averaging. There are heuristics such that normally maxSeconds is not reached.

Value

number of evaluations per second

Examples

1
2
3
4
5
6
7
8
# usage:
timing(runif(100*1000))

# comparing the evaluation speed of wfgEval and wfgWrap on a 5->2 test function of 4 transformations and 1 shape.
spec4 = c(tPoly, tDecept, tMulti, tNonsep, sConvex)
f4 = wfgWrap(2, spec4 )
timing(f4(rep(0.1, 5)))
timing(wfgEval(rep(0.1, 5), 2, spec4 ) )

tudob/wfg documentation built on June 1, 2019, 2:54 a.m.