a forum for people who would rather be compiling something
You are not logged in.
Rebuilding a few things with GCC 4.0.2 on an Athlon 64. Is there any point in -O3 for general stuff, or is -O2 -march=athlon64 -pipe where everyone ends up? The Gentoo forums are full of people swearing by flags they never measured.
Offline
-O3 mostly adds more aggressive inlining and -funswitch-loops, so binaries get bigger, and on a lot of code they get slower because of cache pressure. Use -O2 unless you have a benchmark that says otherwise.
Online
And -ffast-math is not a free speedup, whatever people say. It drops IEEE semantics and I've watched it break a physics sim in very creative ways.
Online
Quick test with lame, same WAV, best of five runs:
-O2 -march=athlon64 41.8s -O3 -march=athlon64 41.2s -O3 -march=athlon64 -funroll-loops 42.0s
Within noise. -O2 it is.
Offline