4 ms·
there does seem to be some overlap with stream fusion -- which was all about exploiting the optimization opportunities when separating the collection operation
by dons 12y ago
there does seem to be some overlap with stream fusion -- which was all about exploiting the optimization opportunities when separating the collection operation from the kernel performed on each element.
We called the bits in the middle "step functions" , which could be combined with "consumers", "producers" and "transformers".
And the algebra generalizes hugely (not just collections) but to things like concurrent processes, data flow programs etc.
http://metagraph.org/papers/stream_fusion.pdf http://metagraph.org/papers/stream_fusion.pdf
Things to think about in a non-Haskell settings: how do you prevent reordering side-effects? Can execeptions/non-termination being reordered be observed?