What is the down side to compiling code with "-g -O3" ??

What is the down side to compiling code with "-g -O3" ??

salmr0's picture

 

Hi,

I am just trying to understand what the implication of compiling production codes with "-g -O3" would be.

Other than binary size being larger what is the downside of including the debug symbols on fortran binaries? Is there a performance penalty? If so roughly around 2%, 5%.?

I understand that debugging code with "-g -O3" is probably a bit difficult for a debugger as the code will probably get moved around by the compiler. I am not trying to debug codes that I know I have a bug on or that are reproducible with this.

I am only trying to this for cases when I have production codes that are running well but for some corner case the code hangs so I would like to attach to it and get some useful information from a debugger.  Some of these are not reproducible or they take to long to get to that point so being able to just attach and get some hint would be useful.

 

Thanks

Rene

 

 

 

 

 

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Steve Lionel (Intel)'s picture

There's not really a performance penalty, other than larger executable size.

Steve

Login to leave a comment.