阅读背景:

使用-g gcc标志编译的程序比不使用-g编译的程序慢吗?

来源:互联网 

I'm compiling a program with -O3 for performance and -g for debug symbols (in case of crash I can use the core dump). One thing bothers me a lot, does the -g option results in a performance penalty? When I look on the output of the compilation with and without -g, I see that the output without -g is 80% smaller than the output of the compilation with -g. If the extra space goes for the debug symbols, I don't care about it (I guess) since this part is not used during runtime. But if for each instruction in the compilation output without -g I need to do 4 more instructions in the compilation output with -g than I certainly prefer to stop using -g option even at the cost of not being able to process core dumps.I'm compiling a program with -O3 for performanc




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: