This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Performace problems with gcc 3.0.4
- From: "Paulo Pinto" <paulo dot pinto at altitude dot com>
- To: "gcc" <gcc at gcc dot gnu dot org>
- Cc: "Joe Buck" <Joe dot Buck at synopsys dot com>
- Date: Tue, 19 Mar 2002 18:16:12 -0000
- Subject: Re: Performace problems with gcc 3.0.4
- Organization: Altitude Software
- References: <200203190957.aa06784@gremlin-relay.ics.uci.edu>
My friend has an Athlon 1400 Mhz
Paulo Pinto
----- Original Message -----
From: "Dan Nicolaescu" <dann@godzilla.ICS.UCI.EDU>
To: "gcc" <gcc@gcc.gnu.org>
Cc: "Joe Buck" <Joe.Buck@synopsys.com>; "Paulo Pinto"
<paulo.pinto@altitude.com>
Sent: Tuesday, March 19, 2002 5:57 PM
Subject: Re: Performace problems with gcc 3.0.4
> Joe Buck wrote:
>
> > > According to [a friend], the following code is about
> > > 50% slower than the version without structs.
> > >
> > > He was tried the ICC (Intel compiler) and it
> > > generates the same code for the two cases but
> > > gcc does not. He played with all optimization
> > > flags that affect numeric code but to no avail.
> > >
> > > Does anyone know what might be the problem ?
> >
> > Yes, it's a well-known problem with gcc. Structs get committed to
memory
> > too early. Some compilers are able to split apart structs and treat
their
> > members as independent scalar variables; gcc can only do this for
structs
> > or classes with a single member.
>
> That is true, but it might not be the problem in this case.
> On SPARC both the assembly generated by gcc-3.0.4 -O2 is identical.
> So you might hit an x86 specific problem...