addRecommendedEfficiency {data.table.threads} | R Documentation |
Function that adds recommended efficiency speedup lines and points to benchmarks
Description
This function adds to the timing results (or the benchmarked data). It computes the recommended efficiency speedup line and the point which denotes the recommended thread count, both being based on the specified efficiency value.
Usage
addRecommendedEfficiency(benchmarkData, recommendedEfficiency = 0.5)
Arguments
benchmarkData |
A |
recommendedEfficiency |
A numeric value between 0 and 1 that defines the slope for the "Recommended" efficiency speedup line. (Default is 0.5) |
Details
This function allows users to add a "Recommended" efficiency line to previously computed benchmark data (without needing to recompute the timings). The recommended speedup is based on the provided efficiency value, which adjusts the slope of the speedup curve and correspondingly helps in the computation of the closest point of measured speedup to the "Recommended" speedup curve.
Value
The input data.table
with the recommended efficiency added to the plot data (attributes).
See Also
findOptimalThreadCount
for computing the benchmark data with measured and ideal speedup data.
Examples
# Finding the best performing thread count for each benchmarked data.table function
# with a data size of 1000 rows and 10 columns:
benchmarks <- data.table.threads::findOptimalThreadCount(1e3, 10)
# Adding recommended efficiency to the plot data:
addRecommendedEfficiency(benchmarks, recommendedEfficiency = 0.6)