Can you tell if -g option would effect performance of the created binary or not?
Yes. While compiling the optimizations specified are honoured with or without debug option '-g', so logically yes there should not be any performance difference. However let me know if you have any issues.
-g changes default optimization level from O2 to O0 to get the correct debug information, this may have some performance impact. However if you are explicitly specifying any optimization level then its honored.
For details you may want to refer Open64 online help manuel for -g option: http://developer.amd.com/tools/open64/onlinehelp/pages/x86_open64_help.htm
Oh right... what I wondered was if the other options were same, for example the difference between '-O3 -g' and '-O3' only. So you are saying that there wouldnt be performance difference between codes compiled with these options as I understand, correct?
Well, there does not seem to be difference in the speed of the code. However I quickly realized that some libraries become huge when compiled with -g option. This could be a problem when the program is loaded into memory and eventually cause performance problems perhaps. I decided to not use it if I dont need to debug programs, just in case if it would cause problems with memory usage.
Retrieving data ...