<p dir="ltr">I think this is an admirable goal, but I do have a few concerns.</p>
<p dir="ltr">1. The inliner is a finicky beast. A guideline that makes sense for one function may make less sense for another depending on how the inliner tends to look at them prior to fusion.</p>
<p dir="ltr">2. There may (I'm not sure) be some combinations that are common enough in real code that it's worth thinking about them specially.</p>
<p dir="ltr">3. unfoldr is a bit of an oddball, because there are good reasons to want to inline it every time regardless of fusion.</p>
<div class="gmail_quote">On Sep 11, 2015 9:24 PM, "wren romano" <<a href="mailto:winterkoninkje@gmail.com">winterkoninkje@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Sep 7, 2015 at 5:08 AM, Joachim Breitner<br>
<<a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a>> wrote:<br>
> Given such a guideline, I would then know what to do with such a<br>
> ticket, instead of stabbing in the dark. It might mean that we would<br>
> have to tell a user who observes suboptimal performance in one case<br>
> that this is unavoidable (we cannot optimize for everyone) and possibly<br>
> explain how to work around the issue. Or we might find that the<br>
> discipline could be improved, but then the improvement should be<br>
> applied to all functions.<br>
<br>
I'm all for this. I've messed around with a lot of list-fusion rewrite<br>
rules, and though I have a good handle on them now, it took a good<br>
deal of trial and error to learn the art of it. In addition to<br>
offering a route to learning, another key aspect of these guidelines<br>
should be to keep track of which practices are still relevant. Over<br>
the years there've been a number of changes in the details of how<br>
rules interact with other optimizations, so it'd be good to air out<br>
what practices are still relevant (and why) vs which ones arose from<br>
legacy issues (and maybe note why they used to but no longer are a<br>
concern)<br>
<br>
--<br>
Live well,<br>
~wren<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>