Mason Protter said:
For that sort of thing I’d heartily recommend Transducers.jl over the regular map, filter, fold constructions
The way to think about them is that they’re a more structured form of a loop, and because they have more structure, they can be (ideally) understood better by a compiler
I can't find any hint of compiler optimization in the package README.md. Does the compiler really output a more performant code with this package?
Nvm, a comparison of the lowered code with iterators can be found in https://juliafolds.github.io/Transducers.jl/dev/explanation/comparison_to_iterators/#comparison-to-iterators. I wish they had put it upfront to showcase the package.
Rein Zustand has marked this topic as resolved.
Last updated: Nov 22 2024 at 04:41 UTC