[Haskell-cafe] Too much inlining on text package

Aleksey Khudyakov alexey.skladnoy at gmail.com
Fri Mar 16 23:19:50 CET 2012

On 17.03.2012 01:51, wren ng thornton wrote:
> 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.
I've checked source. Many functions have RULES to remove unfused 
strings. pack however doesn't

More information about the Haskell-Cafe mailing list