-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworked subset.c #3170
Reworked subset.c #3170
Conversation
…he catching-and-expand of ALTREP too
Codecov Report
@@ Coverage Diff @@
## master #3170 +/- ##
==========================================
- Coverage 92.18% 92.08% -0.11%
==========================================
Files 61 61
Lines 11587 11583 -4
==========================================
- Hits 10682 10666 -16
- Misses 905 917 +12
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #3170 +/- ##
==========================================
+ Coverage 92.18% 92.21% +0.02%
==========================================
Files 61 61
Lines 11587 11578 -9
==========================================
- Hits 10682 10677 -5
+ Misses 905 901 -4
Continue to review full report at Codecov.
|
// Only for use by subsetDT() or subsetVector() below, hence static | ||
{ | ||
if (!length(target)) return target; | ||
const int n = length(idx); | ||
if (length(ans)!=n) error("Internal error: subsetVectorRaw length(ans)==%d n=%d", length(ans), n); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be nocov
here
subset.c
complete for #3165. Other files still to review.Removed all R API use in parallel regions.
Removing the catch-and-expand ALTREP. That's left to R which will do that inside INTEGER(), REAL() etc when they see ALTREP vecs (which is now ok as those R API calls are now outside parallel regions).
Parallel within column rather than across columns: A very big subset of 1 column should benefit from 8 cores now, whereas before that was single threaded.
No
critical
or anything complicated. Simpler.Tighter branch-free loops by dealing with zeros and negatives up-front.
Also makes progress in being able to stop defining
USE_RINTERNALS
: should not be needed for this file now either to work or for performance.