[jhc] Optimization.

John Meacham john at repetae.net
Fri Feb 15 17:46:11 EST 2008

On Fri, Feb 15, 2008 at 03:34:59PM +0100, Lemmih wrote:
> Greetings,
> The attached patch is a two-step optimization:
>  1) Only call 'getType' 100,000,000 times instead of 600,000,000 times.
>  2) Greatly simplify the actual loop.
> Without this patch, compiling base-1.0.hl takes 19 minutes. With this
> patch, compile time is down to 11 minutes.
> Feedback would be greatly appreciated.

thanks, Yeah, there is some questionable algorithmic stuff in the
typechecker/optimizer. in particular I know System.Time hits some
exponential behavior (I believe dealing with the large datatpe and its
derived instances)

I am not including the Maybe patch as I have a different one that
reorganizes more of the libraries to help reduce the 'Prelude glut', the
big mass of mutually recursive modules that include prelude.

PS. could you send patches via 'darcs send'? that way my scripts will
automatically be able to apply them.


John Meacham - ⑆repetae.net⑆john⑈

More information about the jhc mailing list