-O vs. -O2

Bulat Ziganshin bulat.ziganshin at gmail.com
Sun May 9 05:40:50 EDT 2010


Hello Duncan,

Sunday, May 9, 2010, 1:50:31 AM, you wrote:

> It should be -O1 for default/balanced optimisations and -O2 for things
> involving a bigger tradeoff in terms of code size or compile time. so

cloning gcc policy may be a good choice. -O2 is the best optimization
that "guaranteed" to make program faster and -O3 is for speculative
optimization (those that may be breaked by unusual code or made
program slower). not sure about -O1, may be difference is that -O1 or
just -O is "development-time" optimization, i.e. quick&dirty and -O2
generates production code

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Glasgow-haskell-users mailing list