-optc-O2 considered useful

Isaac Dupree isaacdupree at charter.net
Fri May 16 20:17:17 EDT 2008

Simon Marlow wrote:
> This is part of a larger question, namely whether we can get substantial 
> benefit for doing a tiny bit of extra work in -O0.  With -O0 we're 
> optimising for compile time in preference to code speed, although we do 
> want to find a good compromise that doesn't generate abysmal code.

there's the other use of -O0, namely, debugging the compiler -- but 
then, debugging the optimizations probably requires pretty specific 
knowledge of what you're looking for, anyway, and testing on multiple 
platforms usually finds out whether a problem is with a port or with the 
compilation process.

oh, and also that profiling/debugging optimized code can be confusing, 
so it might be good to avoid optimizations that have too much of that effect


More information about the Glasgow-haskell-users mailing list