Skip to content
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

Faster count #2849

Closed
PallHaraldsson opened this issue Sep 1, 2021 · 3 comments
Closed

Faster count #2849

PallHaraldsson opened this issue Sep 1, 2021 · 3 comments

Comments

@PallHaraldsson
Copy link

Hi, @bkamins, since I like your JuliaLang/julia#40564 code (with the "forgetmenot" label, apparently forgotten) so much, wanted it in 1.7 (and 1.6) but will not happen, I was thinking is there a workaround.

You could (conditionally) overwrite the function in Base(?). Do you already? I just know of Compat.jl, for new functions, maybe it's also used for changed functions? And optimizations? Or would the overwriting belong here?

@bkamins
Copy link
Member

bkamins commented Sep 1, 2021

Things in Julia Base are usually slow. I think Compat.jl is not a place for such changes. But clearly you can add:

Base._simple_count(pred, itr, init) = _simple_count_helper(Generator(pred, itr), init)

function _simple_count_helper(g, init::T) where {T}
...

code to your projects and unless you are not exporting them to the public this should not be that bad.

I am closing the issue here as it is not DataFrames.jl related. I propose that if you want to keep the discussion (and maybe get an opinion of other people) to post on Julia Discourse.

Thank you!

@bkamins bkamins closed this as completed Sep 1, 2021
@PallHaraldsson
Copy link
Author

PallHaraldsson commented Nov 19, 2021

At least your PR got merged. I note your "This does not affect DataFrames.jl directly", but it does indirectly and DF would be blamed for slowness? It's regrettable it just wasn't merged earlier for 1.7:

JuliaLang/julia#40564 (comment)

but we couldn't have known back in July 1.7 would be this delayed. Do you have any idea of the regression potential if backported to 1.7? Or policy for, maybe ok for 1.7.1?

@bkamins
Copy link
Member

bkamins commented Nov 19, 2021

The usual way is to comment in the PR in JuliaLang/julia asking for backport and core devs will decide if it is feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants