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

Partition is really slow #26

Open
MasonProtter opened this issue Jan 25, 2024 · 0 comments
Open

Partition is really slow #26

MasonProtter opened this issue Jan 25, 2024 · 0 comments

Comments

@MasonProtter
Copy link
Member

MasonProtter commented Jan 25, 2024

I'm not really sure what it's doing that makes it so slow, but it's real bad:

using Transducers

julia> let v = rand(10000)
           @btime foldl(right, Iterators.partition($v, 100))
           @btime foldxl(right, $v |> Partition(100))
       end;
  63.269 ns (1 allocation: 48 bytes)
  13.608 ms (159299 allocations: 5.47 MiB)
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

1 participant