View source: R/addRecommendedEfficiency.R
addRecommendedEfficiency | R Documentation |
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.
addRecommendedEfficiency(benchmarkData, recommendedEfficiency = 0.5)
benchmarkData |
A |
recommendedEfficiency |
A numeric value between 0 and 1 that defines the slope for the "Recommended" efficiency speedup line. (Default is 0.5) |
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.
The input data.table
with the recommended efficiency added to the plot data (attributes).
findOptimalThreadCount
for computing the benchmark data with measured and ideal speedup data.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.