-
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
implement guniqueN #1120
Comments
Came looking for this. I run into this issue a lot - my recent case being unbearably slow. My case looks more like this
I'd think |
Confirming timings of @ben519... Ran on 1.9.6:
Ran on 1.9.7:
(I missed his edit, but the difference is marginal) |
Update if improved: |
Ideal case where |
When used with with an
|
Using
|
Or But this seem irrelevant to the fact that |
Not sure about github etiquette... should I reply? Anyway, I just wanted to point out that uniqueN() performs particularly bad in this setting which is ok but one has come to expect anything data.table to outperform anything in almost any setting. So maybe there is an issue here? My actual application is kind of different but I'm doing fine using |
you're absolutely right that there's a problem with uniqueN & thanks for
the reproducible benchmark!
I just wanted to suggest valid alternatives in the meantime
…On Thu, Feb 14, 2019, 10:53 PM Sindri ***@***.*** wrote:
Not sure about github etiquette... should I reply? Anyway, I just wanted
to point out that uniqueN() performs particularly bad in this setting which
is ok but one has come to expect anything data.table to outperform anything
in almost any setting. So maybe there is an issue here? My actual
application is kind of different but I'm doing fine using uniqueN2 <-
function(x) length(unique(x)) which also does much better than
dplyr::n_distinct().
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1120 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHQQdX1lqkCantKRBGeOW0w7rvE82YQbks5vNXhMgaJpZM4ECSul>
.
|
Related #3395, #3438 |
another case where setting threads to 1 would probably help is new fifelse function: 93cc9ab |
Most recent data.table. Not always, but quite often...
Related SO: http://stackoverflow.com/a/29684533/2490497
The text was updated successfully, but these errors were encountered: