There is one caveat: turning on the optimization means that the build time increases. The compiler attempts to do clever things, such as following loops and pulling out constants.
但有一个警告:启用优化意味着要增加编译时间——编译器尝试去做一些智能的事情,例如追随循环并分析出常量。
With each higher level of optimization, compile time and systems resources used to compiler the source code increase as the additional amount of performance squeezed out decreases.
随着优化级别的提高,编译源代码所用的编译时间和系统资源增加,而性能的提升幅度下降。
That means that a lot of possible errors are caught at compile time. If you try to add together a number and a string, the compiler will whine at you.
这就意味着很大一部分错误都可以在编译时被发现,若试图将一个数字和字符串相加,编译器就会报错。
- Well -- and I'll fix this blue next time -- I'm first telling the compiler I need access to the standard io library because printf is declared there.
哦!--下次我把这个字体颜色改成蓝色的-,我先告诉编译器--我需要使用,标准输入输出库,因为printf在那个库里面申明的。
应用推荐