Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Feb 2004 17:23:18 -0500
From:      Alexander Kabaev <ak03@gte.com>
To:        "Juan Tumani" <jtumani55@hotmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3v/sgcc2.9.5)
Message-ID:  <20040216172318.4b76daa2@kanpc.gte.com>
In-Reply-To: <BAY12-F541stYkcOj3i00018525@hotmail.com>
References:  <BAY12-F541stYkcOj3i00018525@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 16 Feb 2004 16:36:35 -0500
"Juan Tumani" <jtumani55@hotmail.com> wrote:

> Thanks Matt for picking up on the linker problem.  Patching the kernel
> would, to me, be masking the real problem.
> 
> What other "improvements" does gcc333 have over gcc295 that might
> explain why it's linked products run in a half-fast mode (take twice+
> as long)?
> 
> JT
> 
> 
> >From: Matthew Dillon <dillon@apollo.backplane.com>
> >To: "Juan Tumani" <jtumani55@hotmail.com>
> >CC: des@des.no, freebsd-hackers@freebsd.org
> >Subject: Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance 
> >(gcc3.3.3v/sgcc2.9.5)
> >Date: Mon, 16 Feb 2004 13:12:15 -0800 (PST)
> >
> >     I'm surprised Bruce hasn't chimed in here yet.  I guess he's
> >     tired of repeating himself.
> >
> >     In 4.9, libcsu, which generates crt1.o (which is the start code
> >     for C programs which the linker links in automatically) has this
> >     line in 
> >it:
> >
> >	    andl    $~0xf, %%esp            # align stack to 16-byte
> >	    boundary
> >
> >     So anything linked with 4.9 is going to align the stack on a
> >     16 byte boundary no matter WHAT the kernel does.
> >
> >     FreeBSD-5 does not have this alignment in its crt1.o because
> >     GCC3 automatically aligns the stack on a per-procedure basis. 
> >     Or at least it is supposed to.  Maybe it's broke?  :-)
> >
> >						-Matt
> >
Quite possibly. I run the same test using the latest GCC snapshot
configured as system compiler and did not see such a massive slowdown.
GCC 3.3.3 wins slightly on most tests and loses only on module #2 of the
flops.c program posted here. 

-- 
Alexander Kabaev



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040216172318.4b76daa2>