|
|
发表于 2008-1-16 20:10:41
|
显示全部楼层
试了下,挺风险的,导致编译不能通过的几率加大。
Aggressive GCC optimization:
–O3 –mtune=k8 –funroll–all–loops –ffast–math
–ftree-vectorize –combine –fwhole–program
Flag What it does
–combine Allows multiple source files to be optimized simultaneously
Speeds up mathematical operations. Warning: results may
–ffast–math be inexact; does not follow IEEE or ISO math specifications
–fopenmp OpenMP 2.0 / libgomp support (GCC 4.2.0 and later)
–ftree–vectorize Autovectorization (optimized in GCC 4.3 and later)
Maximizes processors’ branch prediction features in looped
–funroll–all–loops code
–fwhole–program Makes all global functions and variables static
Activates MMX, SSE, SSE2, 3DNow!TM, enhanced 3DNow!TM,
–mtune=k8 and 64-bit instruction set extensions for AMD64 and
AMD64-compatible processors
–O3 Aggressive optimization (see man page for full details)
Enable SSE3 instructions (Next Generation AMD Opteron
–msse3 and later)
–fprofile–generate These switches may be used with profiling
–fprofile–use Tools such as AMD CodeAnalystTM to guide optimization |
|