
13 Aug
2001
13 Aug
'01
4:56 a.m.
Heap usage after compiling my program with -O is vastly different (at least 10x more) than without -O. Why? How can I prevent this? (other than, of course, not using -O)
One possible cause of this is the full-laziness (or almost-full-laziness) transformation that GHC performs when -O is on. If you're up to reading core, then -ddump-simpl or -dverbose-core2core might help you figure out what's going on, after you've narrowed down the culprit with heap profiling. Unfortunately we don't have a way to turn off full-laziness at the moment, aside from patching the compiler. The optimisation pass ordering is specified in main/DriverState.hs, in the function 'buildCoreToDo'. Cheers, Simon
8682
Age (days ago)
8682
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow