public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* core2 flag for arch on gcc 4.3.2
@ 2008-12-28  5:23 tom gogh
  2008-12-28 10:12 ` Tim Prince
  0 siblings, 1 reply; 5+ messages in thread
From: tom gogh @ 2008-12-28  5:23 UTC (permalink / raw)
  To: gcc-help

Hello everyone,

   I am planning to migrate my linux to 4.3.2 but, current flag for core 2 duo is nocona.
I couldn't find elaborate explanation of core2 flag compare to nocona.
What is difference between core2 and nocona flags?
Do they behave identical or core2 offers better performance/tunning?

Thanks,
Tom


      

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: core2 flag for arch on gcc 4.3.2
  2008-12-28  5:23 core2 flag for arch on gcc 4.3.2 tom gogh
@ 2008-12-28 10:12 ` Tim Prince
  2008-12-28 12:24   ` tom gogh
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Prince @ 2008-12-28 10:12 UTC (permalink / raw)
  To: tom gogh; +Cc: gcc-help

tom gogh wrote:

>    I am planning to migrate my linux to 4.3.2 but, current flag for core 2 duo is nocona.
> I couldn't find elaborate explanation of core2 flag compare to nocona.
> What is difference between core2 and nocona flags?
> Do they behave identical or core2 offers better performance/tunning?

Not knowing where you're trying to go with this, default for 64-bit gcc is
 good for Core 2, from no difference up to 50% better throughput than
nocona in my tests.  -msse3 is available for either Nocona or Core 2 CPUs.
 You probably wouldn't want the nocona option even for the older CPU.  I
can't imagine why you don't simply try the options you have in mind, nor
do I understand what you mean by nocona being a current flag.  Maybe you
mean the best option for some old version of gcc which predates Core 2.
I don't think -mtune=barcelona is available until more recent versions of
gcc; it may often give better vectorization even on Core 2, particularly
for Fortran, maybe for C, not so much for C++.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: core2 flag for arch on gcc 4.3.2
  2008-12-28 10:12 ` Tim Prince
@ 2008-12-28 12:24   ` tom gogh
  2008-12-28 16:33     ` Tim Prince
  0 siblings, 1 reply; 5+ messages in thread
From: tom gogh @ 2008-12-28 12:24 UTC (permalink / raw)
  To: tprince; +Cc: gcc-help

Hi Tim,
      sorry for not making it clear.
I am building Gentoo 2008.0 and gcc supported is 4.1.2 which only
supports -mnocona for core 2 duo processor.
By migrating to gcc 4.3.2 I will get tunning for core 2 with flag
-mcore2 but, it involves going to unsupported gcc for Gentoo.
So, I want to know what is the difference between -mnocona flag of gcc
versus -mcore2 flag of gcc 4.3.2. Is it worth in terms of speed
optimization?



--- On Sun, 12/28/08, Tim Prince <TimothyPrince@sbcglobal.net> wrote:

> From: Tim Prince <TimothyPrince@sbcglobal.net>
> Subject: Re: core2 flag for arch on gcc 4.3.2
> To: "tom gogh" <tomgogh20@yahoo.com>
> Cc: gcc-help@gcc.gnu.org
> Date: Sunday, December 28, 2008, 12:22 AM
> tom gogh wrote:
> 
> >    I am planning to migrate my linux to 4.3.2 but,
> current flag for core 2 duo is nocona.
> > I couldn't find elaborate explanation of core2
> flag compare to nocona.
> > What is difference between core2 and nocona flags?
> > Do they behave identical or core2 offers better
> performance/tunning?
> 
> Not knowing where you're trying to go with this,
> default for 64-bit gcc is
>  good for Core 2, from no difference up to 50% better
> throughput than
> nocona in my tests.  -msse3 is available for either Nocona
> or Core 2 CPUs.
>  You probably wouldn't want the nocona option even for
> the older CPU.  I
> can't imagine why you don't simply try the options
> you have in mind, nor
> do I understand what you mean by nocona being a current
> flag.  Maybe you
> mean the best option for some old version of gcc which
> predates Core 2.
> I don't think -mtune=barcelona is available until more
> recent versions of
> gcc; it may often give better vectorization even on Core 2,
> particularly
> for Fortran, maybe for C, not so much for C++.


      

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: core2 flag for arch on gcc 4.3.2
  2008-12-28 12:24   ` tom gogh
@ 2008-12-28 16:33     ` Tim Prince
  2008-12-28 18:40       ` tom gogh
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Prince @ 2008-12-28 16:33 UTC (permalink / raw)
  To: tomgogh20; +Cc: tprince, gcc-help

tom gogh wrote:
> Hi Tim,
>       sorry for not making it clear.
> I am building Gentoo 2008.0 and gcc supported is 4.1.2 which only
> supports -mnocona for core 2 duo processor.
> By migrating to gcc 4.3.2 I will get tunning for core 2 with flag
> -mcore2 but, it involves going to unsupported gcc for Gentoo.
> So, I want to know what is the difference between -mnocona flag of gcc
> versus -mcore2 flag of gcc 4.3.2. Is it worth in terms of speed
> optimization?
> 
You're still being unclear.  If you mean rebuilding an entire distro with
an up to date compiler, there may be reasons why it hasn't been done
already.  If you don't have any idea what kernel or glibc operations you
want to speed up, and how to measure it, and can't define what you mean by
worth while, I have no qualification to make that determination for you.
You give the impression that you haven't even compared the performance of
the compilers on applications which matter to you, or haven't even thought
about which applications matter.  gcc has made great advances since 4.1,
not only in optimizing for current CPU types, but in supporting OpenMP,
auto-vectorization, and current language standards.
Some of the more critical glibc operations are hand coded with inline asm,
so as to prevent gcc optimization from helping out.  If you choose not to
use an up to date memcpy(), for example, you can make it perform much
better by discarding the old glibc source and compiling C source with an
up to date gcc.  I don't know whether your gentoo uses up to date glibc,
but I would doubt it, if the recommended gcc is so old.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: core2 flag for arch on gcc 4.3.2
  2008-12-28 16:33     ` Tim Prince
@ 2008-12-28 18:40       ` tom gogh
  0 siblings, 0 replies; 5+ messages in thread
From: tom gogh @ 2008-12-28 18:40 UTC (permalink / raw)
  To: tprince; +Cc: gcc-help

    I think I was clear to restrict what I was looking for.
Just difference between -mnocona and -mcore2 flags of respective versions
of gcc.
   I understand that 4.1 gcc has no speed optimization and only 4.2 onwards
optimization came in picture.
   Thanks for pointing out role of glibc in this case.
I know, I am not doing benchmarking of applications I am using by compiling them in two gcc versions, running benchmarking scripts.
But, thats the reason I go out asking gcc community what are their
experiences.
    There are many reasons latest gcc doesn't come in many linux distro
just because it requires testing, bug fixing and amount of resources/developers/testers available to migrate distro to new gcc. But, I am
just doing it because I want to take advantage of optimization provided
in gcc 4.3.2. I understand there is risk, but I am taking it.

--- On Sun, 12/28/08, Tim Prince <TimothyPrince@sbcglobal.net> wrote:

> From: Tim Prince <TimothyPrince@sbcglobal.net>
> Subject: Re: core2 flag for arch on gcc 4.3.2
> To: tomgogh20@yahoo.com
> Cc: tprince@computer.org, gcc-help@gcc.gnu.org
> Date: Sunday, December 28, 2008, 9:46 AM
> tom gogh wrote:
> > Hi Tim,
> >       sorry for not making it clear.
> > I am building Gentoo 2008.0 and gcc supported is 4.1.2
> which only
> > supports -mnocona for core 2 duo processor.
> > By migrating to gcc 4.3.2 I will get tunning for core
> 2 with flag
> > -mcore2 but, it involves going to unsupported gcc for
> Gentoo.
> > So, I want to know what is the difference between
> -mnocona flag of gcc
> > versus -mcore2 flag of gcc 4.3.2. Is it worth in terms
> of speed
> > optimization?
> > 
> You're still being unclear.  If you mean rebuilding an
> entire distro with
> an up to date compiler, there may be reasons why it
> hasn't been done
> already.  If you don't have any idea what kernel or
> glibc operations you
> want to speed up, and how to measure it, and can't
> define what you mean by
> worth while, I have no qualification to make that
> determination for you.
> You give the impression that you haven't even compared
> the performance of
> the compilers on applications which matter to you, or
> haven't even thought
> about which applications matter.  gcc has made great
> advances since 4.1,
> not only in optimizing for current CPU types, but in
> supporting OpenMP,
> auto-vectorization, and current language standards.
> Some of the more critical glibc operations are hand coded
> with inline asm,
> so as to prevent gcc optimization from helping out.  If you
> choose not to
> use an up to date memcpy(), for example, you can make it
> perform much
> better by discarding the old glibc source and compiling C
> source with an
> up to date gcc.  I don't know whether your gentoo uses
> up to date glibc,
> but I would doubt it, if the recommended gcc is so old.


      

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-28 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-28  5:23 core2 flag for arch on gcc 4.3.2 tom gogh
2008-12-28 10:12 ` Tim Prince
2008-12-28 12:24   ` tom gogh
2008-12-28 16:33     ` Tim Prince
2008-12-28 18:40       ` tom gogh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).