相关疑难解决方法(0)

-O3 与 -Ofast 优化之间的 gcc 差异

我只是通读 gcc 手册以找出-O3和之间的区别-Ofast

为了 -O3

-O3

Optimize yet more. -O3 turns on all optimizations specified by -O2 and also turns on the following optimization flags:

-fgcse-after-reload 
-fipa-cp-clone
-floop-interchange 
-floop-unroll-and-jam 
-fpeel-loops 
-fpredictive-commoning 
-fsplit-paths 
-ftree-loop-distribute-patterns 
-ftree-loop-distribution 
-ftree-loop-vectorize 
-ftree-partial-pre 
-ftree-slp-vectorize 
-funswitch-loops 
-fvect-cost-model 
-fversion-loops-for-strides
Run Code Online (Sandbox Code Playgroud)

虽然 -Ofast

-Ofast

Disregard strict standards compliance. -Ofast enables all -O3 optimizations. It also enables optimizations that are not valid for
all standard-compliant programs. It turns on -ffast-math,
-fallow-store-data-races and the Fortran-specific -fstack-arrays, unless -fmax-stack-var-size is …
Run Code Online (Sandbox Code Playgroud)

gcc compilation compiler-optimization

7
推荐指数
1
解决办法
1682
查看次数

标签 统计

compilation ×1

compiler-optimization ×1

gcc ×1