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

`foldxt` type unstable

Open MasonProtter opened this issue 1 year ago • 1 comments

Filed in https://github.com/JuliaFolds/Transducers.jl/issues/569 by @atbug

const grid = [[i, j] for i in -4:4, j in -4:4]

foldxt(+, Map(i -> grid[i]), 1:length(grid))

seems to be type unstable, while foldl works well.

I plan to fix this with https://github.com/MasonProtter/StableTasks.jl once it is registered

MasonProtter avatar Jan 25 '24 21:01 MasonProtter

Any update? It seems to me that any call of foldxt is type unstable. Even the examples in https://juliafolds.github.io/Transducers.jl/dev/tutorials/tutorial_parallel/#tutorial-parallel

using Transducers

@code_warntype foldxt(+, Map(sin), rand(10_000_000))

leonardogalliano avatar Aug 10 '24 07:08 leonardogalliano