> Is the parsing itself really such a time sink?  Do you know
> for how many percent of a compile it accounts?  I
> (subjectively) never had the feeling that modules that
> import a lot a particularly bothering me when compiling.  It
> seems more that modules with a lot of functions and/or a
> high number of data type definitions with many constructors
> get the compiler to its knees.

There's a fairly static cost for importing the Prelude (try compiling an
empty module), and when we're compiling GHC we end up parsing if I remember
rightly around 70 interface files for each compilation.  With optimisation
on, all the pragma info is parsed too, which is quite a large cost.

> I found the fact that .hi files are human readable quite
> useful at times; it would be a pity to loose it.

Agreed,

Simon

Reply via email to