summary.aprof, projections of code optimization gains.
# S3 method for aprof
summary(object, ...)
An object returned by the function aprof
.
Additional [and unused] arguments.
Summarizes an "aprof" object and returns a table with the theoretical maximal improvement in execution time for the entire profiled program when a given line of code is sped-up by a factor (called S in the output). Calculations are done using R's profiler output, and requires line profiling to be switched on. Expected improvements are estimated for the entire program using Amdahl's law (Amdahl 1967), and note that Calculations are subject to the scaling of the problem at profiling. The table output aims to answer whether it is worthwhile to spend hours of time optimizing bits of code (e.g. refactoring in C) and, additionally, identifies where these efforts should be focused. Using aprof one can get estimates of the maximum possible gain. Such considerations are important when one wishes to balance development time vs execution time. All predictions are subject to the scaling of the problem.
Amdahl, Gene (1967). Validity of the Single Processor Approach to Achieving Large-Scale Computing Capabilities. AFIS Conference Proceedings (30): 483-485.