-
-
Notifications
You must be signed in to change notification settings - Fork 5
Benchmarks
Karolis Koncevičius edited this page Sep 24, 2021
·
10 revisions
Running times for the implemented tests.
- Benchmarks were computed using matrices with varying numbers of rows and columns.
- All benchmarks were produced using
row_
function variants. -
rnorm()
was used to generate input matrices. - Inputs didn't have any special cases (no
NA
, noInf
, no missing groups, etc). - For tests that had a group parameter all columns were divided into 5 equal groups.
- For
base
functions tests were performed on each row of a matrix using a for loop. - Running times were calculated using
system.time()
function. - Each test was ran 5 times and the median time was used as a run time estimate.
-
Since all the benchmarks were done on "normal" matrices with no missing values - running times may change if missing values are present. For now such cases are not included in the benchmark. Additional benchmarks will be considered if big running time discrepancies are noted in case of NA values, ties, or other special scenarios.
-
base
version tests do not do any post-processing, like arranging the results in a data.frame or extracting of p-values. In such cases the running times forbase
tests might increase a bit further.
In order to run the benchmarks or inspect the code do the following:
# path for the benchmark code files
path <- system.file("benchmarks", package = "matrixTests")
# all implemented benchmarks
files <- list.files(path, pattern="\\.R$", full.names=TRUE)
# run the test file (NOTE: this will print times and generate a png file)
source(files[1], chdir=TRUE)
Alternatively - inspect the source files. Parameters that can be adjusted:
- number of rows
- number of columns
- number of times each test will be executed