Loading GHC into GHCi (and ghcid)

Simon Marlow marlowsd at gmail.com
Fri Jun 8 07:18:00 UTC 2018


On 8 June 2018 at 00:33, Evan Laforge <qdunkan at gmail.com> wrote:

> On Thu, Jun 7, 2018 at 2:48 PM, Bartosz Nitka <niteria at gmail.com> wrote:
> > What version of GHC are you using?
> > There have been some significant improvements like
> > https://phabricator.haskell.org/rGHCb8fec6950ad99cbf11cd22698b
> 8d5ab35afb828f,
> > that only just made it into GHC 8.4.
>
> I did in fact notice a very nice speedup in 8.4, this explains it.
> Finally I know who to thank for it!  Thank you very much for that fix,
> it really makes a difference.
>
> Are there more goodies in the 8.0.2 facebook branch, or have they all
> made it into 8.4?
>
> As loaded modules seem to consume a lot of memory, I've considered
> trying GHC.Compact on them, but haven't looked into what that would
> entail.  Have you considered something like that?
>

I think I looked into this and found that it wasn't going to be easy, but I
forget exactly why. Off the top of my head:
- you can't compact mutable things: perhaps the FastString table would give
us problems here
- there is lots of deliberate laziness to support demand-loading of
interface files, compaction would force all of it
- you can't compact functions, so if there are any functions in ModIface or
ModDetails we would have to avoid compacting those parts of the structure
somehow
- there are cycles and sharing in these structures so we would need to use
the more expensive compaction method that keeps a hash table, which is 10x
slower than cheap compaction

Probably worth looking into to find out exactly what the problems are
though.

Cheers
Simon





> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180608/2cfe2681/attachment.html>


More information about the ghc-devs mailing list