[Haskell-cafe] Too much inlining on text package
wren ng thornton
wren at freegeek.org
Fri Mar 16 22:51:06 CET 2012
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.
More information about the Haskell-Cafe