* Compiler query
@ 2002-02-11 9:56 trouble
2002-02-11 17:11 ` Andrew Schultz
0 siblings, 1 reply; 10+ messages in thread
From: trouble @ 2002-02-11 9:56 UTC (permalink / raw)
Hi,
Hope this post is OK in this group.
Basically the latest version of some numerical software I bought is
performing like a dog. I wrote to customer services and got this
response (below).
Is this correct ?
Thanks.
--------------------------------------------------------------------------
...the problem is with the gcc compiler for alpha linux. It
generates bad code. Now, there is a competing compiler made by
Dec Alpha, which does generate better code on Alpha Linux (more like
Alpha
OSF).
There are a couple of reasons why the gcc compiler was chosen:
1. It is the native compiler for the platform.
2. Dec Alpha's compiler would have required them to link into
some libraries that are not included with the OS. This would have
required the
customer to install these additional libraries as well.
3. The Dec Alpha compiler for Alpha linux was far behind the
current version of Red Hat, so they would have had to revert to an
older version
of RedHat linux.
For these reasons, the native gcc comiler was selected even
though it generates bad code.
In a performance test, Alpha OSF was the fastest machine out of about
10 machines tested. Incidentally, the alpha linux machine was
identical hardware, but came in last in the performance test.
Since the development of gcc is driven by the users, then the
platforms with the most users will become better faster. Linux-intel
performed
comparable to windows in these tests, which shows that the gcc
compiler for
intel is performing much better.
--------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-11 9:56 Compiler query trouble
@ 2002-02-11 17:11 ` Andrew Schultz
2002-02-11 19:14 ` Kenneth Block
2002-02-12 13:35 ` Måns Rullgård
0 siblings, 2 replies; 10+ messages in thread
From: Andrew Schultz @ 2002-02-11 17:11 UTC (permalink / raw)
trouble wrote:
> Basically the latest version of some numerical software I bought is
> performing like a dog. I wrote to customer services and got this
> response (below).
>
> Is this correct ?
> --------------------------------------------------------------------------
> ...the problem is with the gcc compiler for alpha linux. It
> generates bad code. Now, there is a competing compiler made by
> Dec Alpha, which does generate better code on Alpha Linux (more like
(Compaq)
> Alpha
> OSF).
>
> There are a couple of reasons why the gcc compiler was chosen:
> 1. It is the native compiler for the platform.
yes.
> 2. Dec Alpha's compiler would have required them to link into
> some libraries that are not included with the OS. This would have
> required the
> customer to install these additional libraries as well.
yes, but I don't think this would be a big deal. Maybe, but probably not.
> 3. The Dec Alpha compiler for Alpha linux was far behind the
> current version of Red Hat, so they would have had to revert to an
> older version
> of RedHat linux.
probably not. Compaq has not developed their C compiler since August
2000. You can still use the compiler on a new system, although you
might have to install some linux backward-compatibility libraries.
one additional thing is that it is easier for them to stick with gcc.
Code that works with gcc on x86 will probably work with gcc on Alpha
without any tweaking.
> In a performance test, Alpha OSF was the fastest machine out of about
> 10 machines tested. Incidentally, the alpha linux machine was
> identical hardware, but came in last in the performance test.
If they have ported their code to OSF, the additional time to port it to
Compaq's C for Linux should not be too bad.
I haven't actually used their C compiler for Linux, but I have used gcc
on Linux their C compiler on OSF. I've also used their fortran compiler
on both Linux and OSF. The fortran compilers are very similar and
produce similarly performing code.
--
------------------------------------------------------------------
Andrew Schultz | The views expressed might
ajschult@eos.ncsu.edu | not represent those of NCSU.
http://www4.ncsu.edu/~ajschult/ | They are however, correct.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-11 17:11 ` Andrew Schultz
@ 2002-02-11 19:14 ` Kenneth Block
2002-02-12 13:35 ` Måns Rullgård
1 sibling, 0 replies; 10+ messages in thread
From: Kenneth Block @ 2002-02-11 19:14 UTC (permalink / raw)
> > 3. The Dec Alpha compiler for Alpha linux was far behind the
> > current version of Red Hat, so they would have had to revert to an
> > older version
> > of RedHat linux.
>
> probably not. Compaq has not developed their C compiler since August
> 2000. You can still use the compiler on a new system, although you
> might have to install some linux backward-compatibility libraries.
The latest versions of Compaq C/C++ work on Red Hat 6.0 through 7.1 with no
special compaibility libraries. Both Compaq C and C++ have V6.5 releases
that are currently in beta and being tested on a Red Hat 7.2 beta (literally
at this moment.)
> 2. Dec Alpha's compiler would have required them to link into
> some libraries that are not included with the OS. This would have
> required the
> customer to install these additional libraries as well.
The Compaq runtime libraries libots, cpml, and cxml currently ship along
with the Red Hat and SuSE distributions. They may not be installed by
default and they maybe on a seperate CD, but you should have them. You can
also get them from Compaq's website.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-11 17:11 ` Andrew Schultz
2002-02-11 19:14 ` Kenneth Block
@ 2002-02-12 13:35 ` Måns Rullgård
2002-02-12 13:58 ` Falk Hueffner
1 sibling, 1 reply; 10+ messages in thread
From: Måns Rullgård @ 2002-02-12 13:35 UTC (permalink / raw)
Andrew Schultz <ajschult@eos.ncsu.edu> writes:
> I haven't actually used their C compiler for Linux, but I have used
> gcc on Linux their C compiler on OSF. I've also used their fortran
> compiler on both Linux and OSF. The fortran compilers are very
> similar and produce similarly performing code.
I tried compaq's C compiler and gcc 3 with an mpeg4 decoder. Compaq C
produced slightly faster code and a very messed up picture. gcc at
least produced correct code. As long as the faster (~ 5%) code from
ccc doesn't do the right thing I can't see any reason to use it.
--
M�ns Rullg�rd
e99_mru@e.kth.se
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-12 13:35 ` Måns Rullgård
@ 2002-02-12 13:58 ` Falk Hueffner
2002-02-13 8:16 ` Måns Rullgård
0 siblings, 1 reply; 10+ messages in thread
From: Falk Hueffner @ 2002-02-12 13:58 UTC (permalink / raw)
mru@users.sf.net (M�ns Rullg�rd) writes:
> Andrew Schultz <ajschult@eos.ncsu.edu> writes:
>
> > I haven't actually used their C compiler for Linux, but I have
> > used gcc on Linux their C compiler on OSF. I've also used their
> > fortran compiler on both Linux and OSF. The fortran compilers are
> > very similar and produce similarly performing code.
>
> I tried compaq's C compiler and gcc 3 with an mpeg4 decoder. Compaq
> C produced slightly faster code and a very messed up picture. gcc at
> least produced correct code. As long as the faster (~ 5%) code from
> ccc doesn't do the right thing I can't see any reason to use it.
I don't really believe that this is really caused by a bug in Compaq's
compiler; more likely the code is broken. Which mpeg4 decoder did you
try?
BTW, in my experience ccc is sometimes faster and sometimes slower for
integer code than gcc, but IMHO it's always worth trying to use ccc,
because it has better diagnostics and can help finding portability
problems.
Falk
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-12 13:58 ` Falk Hueffner
@ 2002-02-13 8:16 ` Måns Rullgård
2002-02-13 9:39 ` Falk Hueffner
0 siblings, 1 reply; 10+ messages in thread
From: Måns Rullgård @ 2002-02-13 8:16 UTC (permalink / raw)
Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> writes:
> I don't really believe that this is really caused by a bug in Compaq's
> compiler; more likely the code is broken. Which mpeg4 decoder did you
> try?
I tried ffmpeg.
I also tried to compile the POVRay ray tracer. Again ccc was faster
but the picture was junk.
> BTW, in my experience ccc is sometimes faster and sometimes slower for
> integer code than gcc, but IMHO it's always worth trying to use ccc,
> because it has better diagnostics and can help finding portability
> problems.
A problem with ccc is that it doesn't support all the nice gcc
extensions. Also libtool doesn't recognize it, so building shared
libraries is a pain.
--
M�ns Rullg�rd
e99_mru@e.kth.se
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-13 8:16 ` Måns Rullgård
@ 2002-02-13 9:39 ` Falk Hueffner
2002-02-13 11:15 ` Måns Rullgård
0 siblings, 1 reply; 10+ messages in thread
From: Falk Hueffner @ 2002-02-13 9:39 UTC (permalink / raw)
mru@users.sf.net (M�ns Rullg�rd) writes:
> Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> writes:
>
> > I don't really believe that this is really caused by a bug in Compaq's
> > compiler; more likely the code is broken. Which mpeg4 decoder did you
> > try?
>
> I tried ffmpeg.
Hm, I've done a lot of Alpha fixing and optimizing on that one lately,
you might want to try the CVS version. I've also made the experience
that ccc isn't faster on this, though.
> I also tried to compile the POVRay ray tracer. Again ccc was faster
> but the picture was junk.
Povray is a bad testcase; it needs perfect IEEE FP to work correctly,
which Alphas just don't have. Some compiler switches might help there.
Falk
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-13 9:39 ` Falk Hueffner
@ 2002-02-13 11:15 ` Måns Rullgård
2002-02-13 12:04 ` Falk Hueffner
0 siblings, 1 reply; 10+ messages in thread
From: Måns Rullgård @ 2002-02-13 11:15 UTC (permalink / raw)
Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> writes:
> Hm, I've done a lot of Alpha fixing and optimizing on that one lately,
> you might want to try the CVS version. I've also made the experience
> that ccc isn't faster on this, though.
Those optimizations are only for 21164 and later, AFAICS, but mp3 decoding
finally works for Alpha.
> Povray is a bad testcase; it needs perfect IEEE FP to work correctly,
> which Alphas just don't have. Some compiler switches might help there.
I noticed. ccc will do things badly with more optimization than -O2,
and then gcc is just as good. Does the requirement of IEEE fp explain
why povray runs much slower on alpha than on comparable frequency
pentium2?
Overall it seems to me that gcc 3 is nearly as good as ccc for almost
everything, and supports more extensions (which is good since lots of
code uses them). Is there any program where ccc is significantly
better than gcc?
--
M�ns Rullg�rd
e99_mru@e.kth.se
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-13 11:15 ` Måns Rullgård
@ 2002-02-13 12:04 ` Falk Hueffner
2002-02-13 13:53 ` Måns Rullgård
0 siblings, 1 reply; 10+ messages in thread
From: Falk Hueffner @ 2002-02-13 12:04 UTC (permalink / raw)
mru@users.sf.net (M�ns Rullg�rd) writes:
> Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> writes:
>
> > Hm, I've done a lot of Alpha fixing and optimizing on that one lately,
> > you might want to try the CVS version. I've also made the experience
> > that ccc isn't faster on this, though.
>
> Those optimizations are only for 21164 and later, AFAICS, but mp3 decoding
> finally works for Alpha.
Hm, a few of the routines use the MVI extension, those could be easily
adapted, though. Most routines should also work on 21064. But I guess
a 21064 would still be too slow to watch most divx or high resolution
mpeg...
> > Povray is a bad testcase; it needs perfect IEEE FP to work correctly,
> > which Alphas just don't have. Some compiler switches might help there.
>
> I noticed. ccc will do things badly with more optimization than -O2,
> and then gcc is just as good. Does the requirement of IEEE fp
> explain why povray runs much slower on alpha than on comparable
> frequency pentium2?
I guess so; well written floating point programs should be at least as
fast as on similar frequency Intel.
Falk
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Compiler query
2002-02-13 12:04 ` Falk Hueffner
@ 2002-02-13 13:53 ` Måns Rullgård
0 siblings, 0 replies; 10+ messages in thread
From: Måns Rullgård @ 2002-02-13 13:53 UTC (permalink / raw)
Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> writes:
> mru@users.sf.net (M�ns Rullg�rd) writes:
> Hm, a few of the routines use the MVI extension, those could be easily
> adapted, though. Most routines should also work on 21064. But I guess
> a 21064 would still be too slow to watch most divx or high resolution
> mpeg...
They are a bit slow, but mpeg4 can be converted something else, such
as raw video, if there is disk space..
> > I noticed. ccc will do things badly with more optimization than -O2,
> > and then gcc is just as good. Does the requirement of IEEE fp
> > explain why povray runs much slower on alpha than on comparable
> > frequency pentium2?
>
> I guess so; well written floating point programs should be at least as
> fast as on similar frequency Intel.
This would mean that povray is not well written then... AFAIK the
kernel has to fix some fp calculations to strictly IEEE correct, which
seems slow.
--
M�ns Rullg�rd
e99_mru@e.kth.se
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-02-13 13:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-11 9:56 Compiler query trouble
2002-02-11 17:11 ` Andrew Schultz
2002-02-11 19:14 ` Kenneth Block
2002-02-12 13:35 ` Måns Rullgård
2002-02-12 13:58 ` Falk Hueffner
2002-02-13 8:16 ` Måns Rullgård
2002-02-13 9:39 ` Falk Hueffner
2002-02-13 11:15 ` Måns Rullgård
2002-02-13 12:04 ` Falk Hueffner
2002-02-13 13:53 ` Måns Rullgård
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox