system.cpuormem: Categorizing Computation as CPU or RAM Bound

Description Usage Arguments Details Value Examples

Description

This attmpts to declare a computation as compute or memory bound. Some simplifying assumptions are made. See the details section for more information.

Usage

1
system.cpuormem(expr, gcFirst = TRUE, burnin = TRUE)

Arguments

expr

A valid R expression to be profiled.

gcFirst

logical; determines if garbage collection should be called before profiling.

burnin

logical; determines if the function should first be evaluated with an empty expression.

Details

To make our determination, we measure the total number of floating point instructions and the total number of L2 cache accesses. If the number of floating point instructions is greater, then we say the computation is compute bound, and otherwise we say the computation is memory bound.

Value

The results of the requested PAPI events are returned, in a named list, with values stored in double precision.

Examples

1
2
3
4
5
6
## Not run: 
library(pbdPAPI)

system.idle(1+1, events="float")

## End(Not run)

RBigData/pbdPAPI documentation built on May 8, 2019, 5:48 a.m.