<div dir="auto">For truly monster static data, I’ve had success with putting into a c file.  But for interesting data structures this can be not ideal. </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 29, 2021 at 8:26 AM Dušan Kolář <<a href="mailto:kolar@fit.vut.cz">kolar@fit.vut.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">So -O0 didn't help.</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">Nevertheless, ghc suggests to read it from file :-)</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">"...</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">ghc: sorry! (unimplemented feature or known bug)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">  (GHC version 8.6.3 for x86_64-unknown-linux):</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">         Trying to allocate more than 129024 bytes.</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">This is currently not possible due to a limitation of GHC's code generator.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">See <a href="http://hackage.haskell.org/trac/ghc/ticket/4505" target="_blank">http://hackage.haskell.org/trac/ghc/ticket/4505</a> for details.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">Suggestion: read data from a file instead of having large static data</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">structures in code.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">..."</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">It seems that splitting the list into several modules (several thousands of elements per list are OK) works. Moreover, as it is generated, several modules can be generated too. And even more, efficiency is not affected (the same execution time and -O2 used for all modules).</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">Regards (and over :-))</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">Dušan</p></div><div>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">On pátek 29. ledna 2021 13:22:24 CET Henning Thielemann wrote:</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> On Fri, 29 Jan 2021, Sylvain Henry wrote:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> > Could you open a GHC ticket with a reproducing example?</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> > </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> > It looks similar to <a href="https://gitlab.haskell.org/ghc/ghc/-/issues/16577" target="_blank">https://gitlab.haskell.org/ghc/ghc/-/issues/16577</a> so</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> > you may have more chance with `-O0`.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> If disabling optimization helps, then it might be useful to disable it</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> only for this module by adding a pragma to the top of the module:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> {-# OPTIONS_GHC -O0 #-}</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> _______________________________________________</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> Haskell-Cafe mailing list</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> To (un)subscribe, modify options or view archives go to:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">> Only members subscribed via the mailman list are allowed to post.</p>
<br></div><div><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">-- </p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0"> Dusan Kolar            tel: +420 54 114 1238</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0"> UIFS FIT VUT Brno      fax: +420 54 114 1270</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0"> <a href="https://www.google.com/maps/search/Bozetechova+2+e?entry=gmail&source=g">Bozetechova 2</a>       e-mail: <a href="mailto:kolar@fit.vut.cz" target="_blank">kolar@fit.vut.cz</a></p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0"> Brno 612 66</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0"> Czech Republic</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0">--</p>
<br></div>
_______________________________________________<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" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list ar<a href="https://www.google.com/maps/search/Bozetechova+2+e?entry=gmail&source=g">e</a> allowed to post.</blockquote></div></div>