Transducers.jl icon indicating copy to clipboard operation
Transducers.jl copied to clipboard

`Partition` is really slow

Open MasonProtter opened this issue 1 year ago • 0 comments

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)

MasonProtter avatar Jan 25 '24 21:01 MasonProtter