gcc optimization flags for Xeon?

后端 未结 6 936
猫巷女王i
猫巷女王i 2020-12-12 22:22

I\'d want your input which gcc compiler flags to use when optimizing for Xeons?

There\'s no \'xeon\' in mtune or march so which is the closest match?

6条回答
  •  时光说笑
    2020-12-12 23:08

    My experience with Intel CPUs and x86_64 has been that every time I tried to tell gcc to optimize for a specific CPU type, the performance got worse than with -march=generic, not better. YMMV, of course, but I've been playing around with stuff like this lots of times over the years, and it has always been like that.

    OTOH, on i386 it might make sense to target at least i686 or, if you want SSE math, at least Pentium 4.

提交回复
热议问题