david-cortes / MatrixExtra

(R) Efficient methods and operators for the sparse matrix classes in 'Matrix' (esp. CSR format or "RsparseMatrix")
https://cran.r-project.org/package=MatrixExtra
GNU General Public License v3.0
19 stars 3 forks source link

Rcpp? #1

Open mmaechler opened 3 years ago

mmaechler commented 3 years ago

Is it necessary for you to use Rcpp instead of plain C (which is rather faster than slower)? I'm asking because this will make any back porting to Matrix impossible, AFAICS.

david-cortes commented 3 years ago

Rcpp is not really required, but unfortunately C++ is, since it brings some benefits that do make a difference in timings:

Also makes it easier to have functions for different types using templates, compared to putting C functions in headers and playing with macros.

But there's of course workarounds for them, with some penalty in complexity and speed.