This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Fwd: performance with gcc -O0/-O2]
- From: Andrew Haley <aph at redhat dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: gcc at gcc dot gnu dot org, Howard Chu <hyc at highlandsun dot com>
- Date: Tue, 27 Nov 2007 16:35:28 +0000
- Subject: Re: [Fwd: performance with gcc -O0/-O2]
- References: <474C1A62.9000300@highlandsun.com.suse.lists.egcs> <18252.8713.124845.847654@zebedee.pink.suse.lists.egcs> <p73sl2r8z6q.fsf@bingen.suse.de>
Andi Kleen writes:
> Andrew Haley <aph@redhat.com> writes:
>
> > Howard Chu writes:
> >
> > > A bit of a minor mystery. Not a problem, just a curiosity. If
> > > someone knew off the top of their head a reason for it, that'd be
> > > cool, but otherwise no sweat.
> >
> > It's possible, although unlikley, that the optimized code has worse
> > cache behaviour. No way to know better without doing some profiling.
>
> It's quite possible if he hits the conditional store "optimization"
> (that actually adds unnecessary cache misses) that was recently discussed
> in the load thread safety thread.
Possibly. I'm guessing that what we are actually seeing is something
like an acutely timing-sensitive race condition, where making some
threads faster causes pessimal cache behaviour. It's a really
interesting problem. :-)
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903