MatrixExtra icon indicating copy to clipboard operation
MatrixExtra copied to clipboard

Rcpp?

Open mmaechler opened this issue 4 years ago • 1 comments

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.

mmaechler avatar May 17 '21 17:05 mmaechler

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

  • Hashmaps
  • Dynamic vectors
  • Faster argsorting
  • Faster binary search

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.

david-cortes avatar May 17 '21 18:05 david-cortes