-
Notifications
You must be signed in to change notification settings - Fork 991
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
only iterate over unique subset of icols #6630
Comments
Hey there, I noticed that in the current implementation, we iterate over icols which might cause redundant processing. To optimize this, we can create a unique subset of icols that excludes elements from xcols and matches the required i_merge_type. This way, each element is processed only once. Here's a code snippet to achieve this const icols = [/* your array of columns /]; } |
Hi @ben-schwen can we use this line: if (nrow(i)) for (a in seq_along(unique(icols))) |
I don't think it will be so easy -- |
Originally posted by @MichaelChirico in #6603 (comment)
minimal example
In
bmerge
we iterate overicols
withfor (a in seq_along(icols)
, hence in this case we epxlore twicea=1
while once would be enough.Corresponding bmerge line:
data.table/R/bmerge.R
Line 37 in 546259d
The text was updated successfully, but these errors were encountered: