[Haskell-cafe] Compilation of large data

Carter Schonwald carter.schonwald at gmail.com
Fri Jan 29 14:22:52 UTC 2021


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.

On Fri, Jan 29, 2021 at 8:26 AM Dušan Kolář <kolar at fit.vut.cz> wrote:

> So -O0 didn't help.
>
> Nevertheless, ghc suggests to read it from file :-)
>
> "...
>
> ghc: sorry! (unimplemented feature or known bug)
>
>   (GHC version 8.6.3 for x86_64-unknown-linux):
>
>          Trying to allocate more than 129024 bytes.
>
> This is currently not possible due to a limitation of GHC's code generator.
>
> See http://hackage.haskell.org/trac/ghc/ticket/4505 for details.
>
> Suggestion: read data from a file instead of having large static data
>
> structures in code.
>
> ..."
>
> 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).
>
> Regards (and over :-))
>
> Dušan
>
> On pátek 29. ledna 2021 13:22:24 CET Henning Thielemann wrote:
>
> > On Fri, 29 Jan 2021, Sylvain Henry wrote:
>
> > > Could you open a GHC ticket with a reproducing example?
>
> > >
>
> > > It looks similar to https://gitlab.haskell.org/ghc/ghc/-/issues/16577
> so
>
> > > you may have more chance with `-O0`.
>
> > If disabling optimization helps, then it might be useful to disable it
>
> > only for this module by adding a pragma to the top of the module:
>
> >
>
> > {-# OPTIONS_GHC -O0 #-}
>
> > _______________________________________________
>
> > Haskell-Cafe mailing list
>
> > To (un)subscribe, modify options or view archives go to:
>
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
> > Only members subscribed via the mailman list are allowed to post.
>
> --
>
>  Dusan Kolar            tel: +420 54 114 1238
>
>  UIFS FIT VUT Brno      fax: +420 54 114 1270
>
>  Bozetechova 2
> <https://www.google.com/maps/search/Bozetechova+2+e?entry=gmail&source=g>
> e-mail: kolar at fit.vut.cz
>
>  Brno 612 66
>
>  Czech Republic
>
> --
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are
> <https://www.google.com/maps/search/Bozetechova+2+e?entry=gmail&source=g>
> allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210129/569fdbea/attachment.html>


More information about the Haskell-Cafe mailing list