g*********s 发帖数: 1782 | 1 发现一段code的编译结果,O3比O2还慢一点。 |
b******n 发帖数: 592 | 2 That's normal. I would use O2 plus a few extra optimisation parameters. Also
try not to use latest GCC. 4.1 is bad. 4.2,4.3 is good. and 4.4 is a no
【在 g*********s 的大作中提到】 : 发现一段code的编译结果,O3比O2还慢一点。
|
g*********s 发帖数: 1782 | 3 What's the possible reason? Any toy example to show?
Also
【在 b******n 的大作中提到】 : That's normal. I would use O2 plus a few extra optimisation parameters. Also : try not to use latest GCC. 4.1 is bad. 4.2,4.3 is good. and 4.4 is a no
|
b******n 发帖数: 592 | 4 It all depends. That's why you should try different options when possible. A
lso different architecture may require different solution. On AMD, hardcoded
SSE gave me 50% gain in speed. On Intel, it is a lot less.
【在 g*********s 的大作中提到】 : What's the possible reason? Any toy example to show? : : Also
|
f*****Q 发帖数: 1912 | 5 O3的code比O2大,如果缓存装不下了性能就下来了。
【在 g*********s 的大作中提到】 : 发现一段code的编译结果,O3比O2还慢一点。
|