Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CFLAGS with an Ivy Bridge (tuning compiler)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Malik222
n00b
n00b


Joined: 15 Aug 2012
Posts: 12

PostPosted: Wed Aug 15, 2012 4:05 am    Post subject: CFLAGS with an Ivy Bridge (tuning compiler) Reply with quote

Hi,

I just got an Intel Ivy Bridge I7 CPU. I was emerging -e system with the following CFLAGS:

-march=corei7-avx-i -mtune=corei7-avx-i -O3

It seems lots of packages can't compile with these CFLAGS.

I installed GCC 4.7.1 to be able to get the optimization for the Ivy Bridge (thus the ...avx-i). Although, so far, I checked at the benchmarks from Phoronix (http://www.phoronix.com/scan.php?page=article&item=intel_ivy_tuning&num=4) and it didn't seem worth it trying to set the compiler to use the new Ivy Bridge functions.



Has anyone tried to use the -march with ...avx (Sandy Bridge) or ...avx-i (Ivy) ? What are the differences in terms of performance for instance? If you have any suggestions?

Should I even bother or leave it like this:
CFLAGS="-march=native -O2 -pipe"

Thank you
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Wed Aug 15, 2012 10:41 am    Post subject: Reply with quote

Short answer:
Quote:
Should I even bother or leave it like this:
CFLAGS="-march=native -O2 -pipe"

Don't bother, and stick to -march=native.

and -march=native will revert automatically to the best suited -march, which will be core-avx-i.

Long answer:
the improvements between sandy bridge and ivy bridge mainly concern the avx (or sse) part of the cpu, which their vector processing unit for floating point. The only programms that make extensive use of that are scientific ones (number crunching), multimedia applications (steam conversion, image manipulation) and games (though they are rarely self-compiled).

If you are using one of those programs you might see a difference in speed, but it hard to say if that improvement is measurable, let alone noticeable for a human being (you need ~30% of speed improvement to be noticed as human)


HTH
V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
Malik222
n00b
n00b


Joined: 15 Aug 2012
Posts: 12

PostPosted: Wed Aug 15, 2012 1:19 pm    Post subject: compiling Reply with quote

Thank you!

I'll stick with -march=native as you said. Everything is compiling fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum