JuliaFolds / Transducers.jl

Efficient transducers for Julia
https://juliafolds.github.io/Transducers.jl/dev/
MIT License
432 stars 24 forks source link

More uniform reduce chunk sizes #558

Closed nlw0 closed 1 year ago

nlw0 commented 1 year ago

It's usually desirable to have chunk sizes as similar as possible. If we simply divide the array by the number of threads, sometimes the last chunk can turn out to have a very different size from the others. By changing the way we compute the indices, dividing by the number of arrays after we multiply by the chunk index, we ensure chunk sizes differ at most by 1.

MasonProtter commented 1 year ago

Hi @nlw0 thanks for writing this, there is no future work happening on this version of the repository, all PRs and such should be directed to the new head at https://github.com/JuliaFolds2/Transducers.jl