<div dir="auto">I suspect that to get deeper into this you'll need a debugging build of GHC, which I believe will break down the desugaring pass into its constituent sub-passes. One possibility is that the "gentle optimization" pass is proving not to be so gentle on your code.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 15, 2021, 12:03 PM Troels Henriksen <<a href="mailto:athas@sigkill.dk">athas@sigkill.dk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Henning Thielemann <<a href="mailto:lemming@henning-thielemann.de" target="_blank" rel="noreferrer">lemming@henning-thielemann.de</a>> writes:<br>
<br>
> On Mon, 15 Feb 2021, Troels Henriksen wrote:<br>
><br>
>> I have a program with about 220 modules.  One of these modules takes<br>
>> _much_ longer to compile than the others (several minutes longer).  I<br>
>> don't understand why.  It compiled much faster with GHC 8.8.3, but got<br>
>> orders of magnitude slower when I changed to GHC 8.10.2.  I don't<br>
>> understand why, since I don't think there is nothing special about the<br>
>> module - e.g. no type-level programming.<br>
><br>
> Does the problem persist with GHC-8.10.4?<br>
<br>
Yes.  I'll try with GHC 9.10.1 once my dependencies catch up.<br>
<br>
> I would try to out-comment parts of the module and watch when<br>
> compilation becomes faster.<br>
<br>
I will try that.  I also noticed that other modules are affected as<br>
well, although to a lesser degree, and by passing<br>
'--ghc-options=-dshow-passes' I obtained this information:<br>
<br>
!!! Desugar [Futhark.Pass.ExtractKernels.DistributeNests]: finished in 255448.24 milliseconds, allocated 363811.623 megabytes<br>
<br>
So apparently the "desugar" pass takes over four minutes.  Apart from<br>
lowering Haskell into Core, what exactly does this pass do that is so<br>
expensive?  The following Simplifier passes take almost no time in<br>
comparison.<br>
<br>
-- <br>
\  Troels<br>
/\ Henriksen<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>