<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 26, 2017 at 3:05 PM, Johannes Waldmann <span dir="ltr"><<a href="mailto:johannes.waldmann@htwk-leipzig.de" target="_blank">johannes.waldmann@htwk-leipzig.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What Michael did not mention in the mail, but it's in his code:<br>
numerals defaulted to Integer, and the story changes (somewhat)<br>
if we force Int.<br>
<br>
I updated my measurements:<br>
<a href="http://www.imn.htwk-leipzig.de/~waldmann/etc/mob/" rel="noreferrer" target="_blank">http://www.imn.htwk-leipzig.<wbr>de/~waldmann/etc/mob/</a><br>
and ghc-8 looks better now - but not quite wins.<br>
<span class=""><br>
> there's still some more low hanging fruit here<br>
<br>
</span>... for whom? What could we reasonably expect of the compiler here?<br>
It could do the strictification? the unboxing?<br>
<br>
It certainly could not replace Integer by Int,<br>
since the range of numerical values has no obvious bound.<br>
<br>
But then, all these Integers are small, but we pay quite an overhead<br>
(for represeting Int as Integer) which has increased for current ghcs?<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>I meant that, if someone wanted to bring down allocations significantly, I would think there's still room for optimization. I was not commenting on what GHC should or shouldn't be capable of doing here. It would certainly be nice, for example, if it was capable of noticing the strictness involved and automatically unbox the STRefs, but that would be quite a feat.</div><div><br></div><div>I didn't investigate further myself, so I could be mistaken about the possibility to further reduce allocations. It was just a guess (thus the "I think").</div><div><br></div><div>Michael</div></div></div></div>