findOptimalThreadCount {data.table.threads} | R Documentation |
Function that finds the optimal (fastest) thread count for different data.table
functions
Description
This function finds the optimal thread count for running data.table
functions with maximum efficiency.
Usage
findOptimalThreadCount(rowCount, colCount, times = 10, verbose = FALSE)
Arguments
rowCount |
The number of rows in the |
colCount |
The number of columns in the |
times |
The number of times the benchmarks are to be run. |
verbose |
Option (logical) to enable or disable detailed message printing. |
Details
Iteratively runs benchmarks with increasing thread counts and determines the optimal number of threads for each data.table
function.
Value
A data.table
of class data_table_threads_benchmark
containing the optimal thread count for each data.table
function.
Examples
# Finding the best performing thread count for each benchmarked data.table function
# with a data size of 1000 rows and 10 columns:
(optimalThreads <- data.table.threads::findOptimalThreadCount(1e3, 10))
[Package data.table.threads version 1.0.1 Index]