
16 Mar
2012
16 Mar
'12
5:51 p.m.
On 3/16/12 12:22 PM, Aleksey Khudyakov wrote:
Disclaimer. I'm no expert in text internals.
Because it's told to do so. This is an unfortunate feature of stream fusion. It does eliminate intermediate data structures but it requires that everything is inlined.
There are ways of mitigating that, however. In particular, the standard style is to have things inline aggressively before stage 0 or 1, and then in the last stage to "inline" things back to an indirect call to the library. This is used ubiquitously in GHC's list fusion, and is essential for stream-fusion since the intermediate stream form is a pessimation when it can't partake in fusion. -- Live well, ~wren