<p dir="ltr">Thank you! I will dig into using that ASAP now that I can understand the directions.</p>
<div class="gmail_quote">On Aug 29, 2014 5:50 AM, "Simon Peyton Jones" <<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have added a section "Ticky-ticky quick start" to our ticky-ticky profiling page, to explain how I go about dealing with the problem you describe<br>
<a href="https://ghc.haskell.org/trac/ghc/wiki/Debugging/TickyTicky" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Debugging/TickyTicky</a><br>
<br>
Simon<br>
<br>
| -----Original Message-----<br>
| From: David Feuer [mailto:<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>]<br>
| Sent: 20 August 2014 09:33<br>
| To: Simon Peyton Jones<br>
| Subject: Re: Fusion<br>
|<br>
| I'll be happy to try to expand it with some examples. I'm wondering if<br>
| you could help me figure something out: the (simple) cons/build rule<br>
| we discussed, along with the similar cons/augment rule,<br>
|<br>
| "cons/build"    forall (x::a) (g::forall b . (a->b->b)->b->b) . x :<br>
| build g = build (\c n -> c x (g c n))<br>
| "cons/augment"  forall (x::a) (g::forall b . (a->b->b)->b->b)<br>
| (xs::[a]) . x : augment g xs = augment (\c n -> c x (g c n)) xs<br>
|<br>
| somehow *increase* allocation substantially (11.7%) in the "event"<br>
| NoFib test, and also significantly (3.6%) in constraints, somewhat<br>
| (2.4%) in nucleic2 [remember this] and 1.4% in ansi. I am having a<br>
| heck of a time trying to figure out how to track these down, and<br>
| burning loads of time recompiling GHC over and over again. On the flip<br>
| side of things, the wang test reduces allocation by 45.8% if I use<br>
| these rules (both of which fire), but only when I also use -fsimple-<br>
| list-literals for nofib/spectral/hartel/nucleic2/Main.hs.<br>
| nucleic2 still performs a little more allocation.<br>
|<br>
| On Wed, Aug 20, 2014 at 2:56 AM, Simon Peyton Jones<br>
| <<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>> wrote:<br>
| > Great start, thank you. Can I suggest that for each question you<br>
| give<br>
| > a concrete example?  Otherwise only experts, who already know a lot<br>
| about<br>
| > rules, will understand the question, let alone the answer.   I’d be<br>
| happy to<br>
| > take another look then.<br>
| ><br>
| ><br>
| > Simon<br>
| ><br>
| ><br>
| ><br>
| > From: David Feuer [mailto:<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>]<br>
| > Sent: 19 August 2014 23:30<br>
| > To: Simon Peyton Jones<br>
| > Cc: Haskell Libraries<br>
| > Subject: Re: Fusion<br>
| ><br>
| ><br>
| ><br>
| > I've started a page at<br>
| > <a href="https://ghc.haskell.org/trac/ghc/wiki/FoldrBuildNotes" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/FoldrBuildNotes</a><br>
| > Please feel free to add, correct, etc.<br>
| ><br>
| > On Aug 19, 2014 3:10 AM, "Simon Peyton Jones"<br>
| <<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>> wrote:<br>
| ><br>
| > David<br>
| ><br>
| > You've been doing all this work on improving fusion, and you<br>
| probably<br>
| > have a very good idea now about how it works, and how GHC's<br>
| libraries<br>
| > use phases and RULES to achieve it. A kind of design pattern, if you<br>
| > like; tips and tricks.<br>
| ><br>
| > I wonder if you'd feel able to write a GHC wiki page describing what<br>
| > you have learned, with examples and explanation about why it is done<br>
| that way.<br>
| > If you did this, someone who follows in your footsteps wouldn't need<br>
| > to re-learn everything.  And maybe someone will say "oh, there's one<br>
| > pattern you have omitted, here it is".<br>
| ><br>
| > Thanks<br>
| ><br>
| > Simon<br>
</blockquote></div>