-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use same code path for count(pred, itr)
as sum(pred, itr)
#20663
Comments
see #20404 |
I very much disagree with this. To reiterate what I said in #20404 (comment), should we make |
Yes, I see what you mean; I hadn't seen #20404 before I posted. In any case, |
count(pred, itr)
count(pred, itr)
as sum(pred, itr)
On current master, julia> bench(10^8)
0.104584 seconds
0.059525 seconds
julia> 0.104584 / 0.059525
1.7569760604787903 |
This seems to be fixed on latest master:
|
count(pred, itr)
(currently) has the same functionality assum(pred, itr)
, only slower:After warmup on latest master:
We could just define
count(pred, itr) = sum(pred, itr)
but the(EDITED according to @ararslan's comment below and #20404 ).count
function just seems to be redundantThis came up in
https://discourse.julialang.org/t/compute-number-of-values-in-an-array-above-a-threshold/2167
The text was updated successfully, but these errors were encountered: