karoliskoncevicius / matrixTests

R package for computing multiple hypothesis tests on rows/columns of a matrix or a data.frame
https://cran.r-project.org/web/packages/matrixTests/index.html
36 stars 5 forks source link

Investigate potential performance improvements by turning main functions to be column-wise #3

Closed karoliskoncevicius closed 1 year ago

karoliskoncevicius commented 5 years ago

Right now all functions work on rows by default and column versions transpose the input data and call the corresponding row function.

However in R column-wise functions should be about 2x faster due to how the matrices are stored in memory. Therefore it's worth investigating if making the test functions work on columns instead of rows could add additional boost to performance.

karoliskoncevicius commented 5 years ago

Verdict: It's better to have separate row and col functions because:

  1. Transpose can take a long time
  2. Warnings and errors have to be adapted to row and col separately
  3. Functions in matrixStats have no speed differences between row and col functions.