GeezerVison is showing github.com — intersect performance · Issue #143 · Rcpp11/Rcpp11
intersect performance #143
Activity
kevinushey commented on Apr 13, 2014
Personally, I think there should be less use of STL containers in sugar when possible. It's expensive to copy from R, to STL, and back again.
That said, can we re-write intersect to leverage other sugar functions? E.g. we could implement something like
IntegerVector matches = match(lhs, rhs);
LHS_T res = y[matches];
return unique(res);
which follows from the R implementation, and hence we only need efficient match and unique routines.
romainfrancois commented on Apr 13, 2014
ContributorAuthor
More actions
except y[matches] is not implemented. I know you have it in Rcpp and have proposal for it here, but I still don't think I want it, to avoid the 0-based / 1-based confusion.
In that case, I'd like to find out what the problem is, what is slow, etc ...
kevinushey commented on Apr 13, 2014
Consider adding it for the LogicalVector / CharacterVector cases though.
Metadata
Metadata
Development
No branches or pull requestsIssue actions