* Re: [Lse-tech] gcc 2.95 vs 3.21 performance
2003-02-03 23:05 Martin J. Bligh
@ 2003-02-03 23:22 ` Andi Kleen
2003-02-04 12:20 ` Dave Jones
1 sibling, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2003-02-03 23:22 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: linux-kernel, lse-tech
On Mon, Feb 03, 2003 at 03:05:06PM -0800, Martin J. Bligh wrote:
> The results below leaves me distinctly unconvinced by the supposed
> merits of modern gcc's. Not really better or worse, within experimental
> error. But much slower to compile things with.
Curious - could you compare it with a gcc 3.3 snapshot too?
It should be even slower at compiling, but generate better code.
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lse-tech] gcc 2.95 vs 3.21 performance
2003-02-03 23:05 Martin J. Bligh
2003-02-03 23:22 ` [Lse-tech] " Andi Kleen
@ 2003-02-04 12:20 ` Dave Jones
2003-02-04 15:50 ` Martin J. Bligh
1 sibling, 1 reply; 6+ messages in thread
From: Dave Jones @ 2003-02-04 12:20 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: linux-kernel, lse-tech
On Mon, Feb 03, 2003 at 03:05:06PM -0800, Martin J. Bligh wrote:
> People keep extolling the virtues of gcc 3.2 to me, which I'm
> reluctant to switch to, since it compiles so much slower. But
> it supposedly generates better code, so I thought I'd compile
> the kernel with both and compare the results. This is gcc 2.95
> and 3.2.1 from debian unstable on a 16-way NUMA-Q. The kernbench
> tests still use 2.95 for the compile-time stuff.
>
> The results below leaves me distinctly unconvinced by the supposed
> merits of modern gcc's. Not really better or worse, within experimental
> error. But much slower to compile things with.
What kernel was kernbench compiling ? The reason I'm asking is that
2.5s (and more recent 2.4.21pre's) will use -march flags for more
aggressive optimisation on newer gcc's.
If you want to compare apples to apples, make sure you choose
something like i386 in the processor menu, and then it'll always
use -march=i386 instead of getting fancy with things like -march=pentium4
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lse-tech] gcc 2.95 vs 3.21 performance
2003-02-04 12:20 ` Dave Jones
@ 2003-02-04 15:50 ` Martin J. Bligh
2003-02-10 12:13 ` Momchil Velikov
0 siblings, 1 reply; 6+ messages in thread
From: Martin J. Bligh @ 2003-02-04 15:50 UTC (permalink / raw)
To: Dave Jones; +Cc: linux-kernel, lse-tech
> > People keep extolling the virtues of gcc 3.2 to me, which I'm
> > reluctant to switch to, since it compiles so much slower. But
> > it supposedly generates better code, so I thought I'd compile
> > the kernel with both and compare the results. This is gcc 2.95
> > and 3.2.1 from debian unstable on a 16-way NUMA-Q. The kernbench
> > tests still use 2.95 for the compile-time stuff.
> >
> > The results below leaves me distinctly unconvinced by the supposed
> > merits of modern gcc's. Not really better or worse, within experimental
> > error. But much slower to compile things with.
>
> What kernel was kernbench compiling ? The reason I'm asking is that
> 2.5s (and more recent 2.4.21pre's) will use -march flags for more
> aggressive optimisation on newer gcc's.
> If you want to compare apples to apples, make sure you choose
> something like i386 in the processor menu, and then it'll always
> use -march=i386 instead of getting fancy with things like -march=pentium4
Kernbench compiles 2.4.17, because I'm old, slow and lazy, and that
was what was around when I started doing this test ;-)
But the point is still the same ... even if it is doing more agressive
optimisation, it's not actually buying us anything (at least for the kernel)
M.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lse-tech] gcc 2.95 vs 3.21 performance
2003-02-04 15:50 ` Martin J. Bligh
@ 2003-02-10 12:13 ` Momchil Velikov
0 siblings, 0 replies; 6+ messages in thread
From: Momchil Velikov @ 2003-02-10 12:13 UTC (permalink / raw)
To: Martin J. Bligh; +Cc: Dave Jones, linux-kernel, lse-tech
>>>>> "Martin" == Martin J Bligh <mbligh@aracnet.com> writes:
Martin> But the point is still the same ... even if it is doing
Martin> more agressive optimisation, it's not actually buying us
Martin> anything (at least for the kernel)
which might be due in part to ``-fno-strict-aliasing'' used to compile
the Linux kernel.
~velco
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lse-tech] gcc 2.95 vs 3.21 performance
@ 2003-02-10 20:13 Albert Cahalan
2003-02-10 20:49 ` Falk Hueffner
0 siblings, 1 reply; 6+ messages in thread
From: Albert Cahalan @ 2003-02-10 20:13 UTC (permalink / raw)
To: linux-kernel; +Cc: velco, mbligh, davej, ak
Momchil Velikov writes:
> "Martin" == Martin J Bligh <mbligh@aracnet.com> writes:
>> But the point is still the same ... even if it is doing
>> more agressive optimisation, it's not actually buying us
>> anything (at least for the kernel)
>
> which might be due in part to ``-fno-strict-aliasing''
> used to compile the Linux kernel.
This is fixable for any gcc implementing __may_alias__.
Linux uses -fno-strict-aliasing because people like
to cast a (foo*) to an (int*) instead of using a
union or (char*) as required by the C language.
When -fno-strict-aliasing was added to the command
line, gcc did not offer the __may_alias__ attribute.
BTW, in case any gcc hacker is paying attention,
the documentation fails to mention the gcc version
required for this or any other attribute. Also it
would be nice to have an option to ditch the (char*)
exception; it's junk when you have __may_alias__.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lse-tech] gcc 2.95 vs 3.21 performance
2003-02-10 20:13 [Lse-tech] gcc 2.95 vs 3.21 performance Albert Cahalan
@ 2003-02-10 20:49 ` Falk Hueffner
0 siblings, 0 replies; 6+ messages in thread
From: Falk Hueffner @ 2003-02-10 20:49 UTC (permalink / raw)
To: linux-kernel
Albert Cahalan <albert@users.sourceforge.net> writes:
> BTW, in case any gcc hacker is paying attention, the documentation
> fails to mention the gcc version required for this or any other
> attribute. Also it would be nice to have an option to ditch the
> (char*) exception; it's junk when you have __may_alias__.
I don't think a switch that makes standard compliant source break in
potentially very subtle ways is a good idea. Just use "restrict".
--
Falk
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-02-10 20:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-10 20:13 [Lse-tech] gcc 2.95 vs 3.21 performance Albert Cahalan
2003-02-10 20:49 ` Falk Hueffner
-- strict thread matches above, loose matches on Subject: below --
2003-02-03 23:05 Martin J. Bligh
2003-02-03 23:22 ` [Lse-tech] " Andi Kleen
2003-02-04 12:20 ` Dave Jones
2003-02-04 15:50 ` Martin J. Bligh
2003-02-10 12:13 ` Momchil Velikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox