<div class="gmail_quote">On Sun, Mar 18, 2012 at 12:02 AM, Michael Snoyman <span dir="ltr">&lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
</div></div>OK, issue created: <a href="https://github.com/bos/text/issues/19" target="_blank">https://github.com/bos/text/issues/19</a></blockquote><div><br></div><div>I <a href="https://github.com/bos/text/commit/2b2cb084c4689c06f1a7851ff8eb1e412eb02c1b">fixed the too-much-inlining bug</a> tonight. As a bonus, Text literals are now decoded straight from GHC&#39;s packed encoding, without an intermediate step through String.</div>
<div><br></div><div>Generated code now looks like this at -O and above:</div><div><br></div><div><font face="courier new, monospace">$ ghc -O -ddump-simpl -c CS.hs</font></div><div><font face="courier new, monospace">CS.foo :: Data.Text.Internal.Text</font></div>
<div><font face="courier new, monospace">[GblId, ...]</font></div><div><font face="courier new, monospace">CS.foo = Data.Text.unpackCString# &quot;x\NULy&quot; </font></div></div>