gcc의 -O2 옵션은 무엇을 합니까? [폐쇄]

gcc의 -O2 옵션은 무엇을 합니까? [폐쇄]

gcc의 -O2 옵션은 무엇을 합니까?

예를 들어.gcc -O2 file1.c -o file1.o

답변1

-O옵션은 컴파일러 최적화를 활성화합니다. 에서 man gcc:

   -O2 Optimize even more.  GCC performs nearly all supported
       optimizations that do not involve a space-speed tradeoff.  As
       compared to -O, this option increases both compilation time and the
       performance of the generated code.

특정 최적화 목록은 매뉴얼 페이지를 참조하십시오.

관련 정보