GCC optimization flags for Intel Atom [closed]

2019-01-13 02:23发布

I'm developing a performance critical application for Intel Atom processor.

What are the best gcc optimization flags for this CPU?

9条回答
该账号已被封号
2楼-- · 2019-01-13 03:21

Just like for Pentium 4:

-march=prescott -O2 -pipe -fomit-frame-pointer
查看更多
不美不萌又怎样
3楼-- · 2019-01-13 03:22

here's some cross-pollenation of blogs... what i was really hoping for was a firefox-compiled-for-atom benchmark...

Address : http :// ivoras.sharanet.org/blog/tree/2009-02-11.optimizing-for-atom.html

"As it turns out, gcc appears to do a very decent job with -mtune=native, and mtune=generic is more than acceptable. The biggest gains (in this math-heavy benchmark) come from using SSE for math, but even they are destroyed by tuning for pentium4.

"The difference between the fastest and the slowest optimization is 21%. The impact of using march instead of mtune is negligible (not enough difference to tell if it helps or not).

"(I've included k6 just for reference - I know Atom doesn't have 3dnow)

"Late update: Tuning for k8 (with SSE and O3) yields a slightly higher best score of 182."

查看更多
看我几分像从前
4楼-- · 2019-01-13 03:23

From Intel, Getting Started with MID

When using GCC to compile, there are a few recommended flags to use:

  • -O2 or -O1: O2 flag optimizes for speed, while the -O1 flag optimizes for size
  • -msse3
  • -march=core2
  • -mfpmath=sse
查看更多
登录 后发表回答