Quote Originally Posted by ssam View Post
a good choice of -march might be 'native'. also see http://en.gentoo-wiki.com/wiki/Safe_Cflags

in my own tests with a fortran simulation code O3 beats Os (though this is probably not generally true)
http://www.hep.man.ac.uk/u/sam/zgoubi-optimise/oberon/

with GCC you might want to look at lto. O3 + lto can make smaller binaries than Os
http://gcc.gnu.org/wiki/summit2010?a...et=hubicka.pdf

Also i remember reading an article about how big caches and clever precaching on modern CPUs meant that O3 was better than Os now. i think it was a report by intel. but i can't find it.
"native" should be the same as "core 2" for my hardware. I might include LTO last for GCC along with the ICC-specific settings suggested above for ICC. First going to run through the rest of the compilers though... it takes a long time .