GHC compiled program slower with -O1 than -O0

Neil Mitchell ndmitchell at
Mon Mar 19 11:57:53 EDT 2007

Hi Simon

> One thing to check is heap usage and GC time. Does GC time, or residency (both reported by -Sstderr)  go up a lot?  It's possible that an optimisation is changing space behaviour for the worse.

I've attached the logs for both -O0 (norm) and -O1 (opt), it appears
that there are 4 times more garbage collections with -O1, so thats
likely to be it.

> Does it still happen if you use profiling?  If so, the profile should narrow down the culprit a lot.  That might avoid the need to reproduce it elsewhere.

Profiling with -O1 is faster than -O1 and -O0, so turning on profiling
fixes whatever is going wrong.

The darcs repo for the code is at:

This is the catch_1 directory. Unfortunately it will be a nightmare to build...


-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/zip
Size: 17642 bytes
Desc: not available
Url :

More information about the Glasgow-haskell-users mailing list