Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Best compiler for 64bit code on alpha-linux
@ 1998-05-10  4:00 Shane Steven Sturrock
  1998-05-10  4:00 ` Toon Moene
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Shane Steven Sturrock @ 1998-05-10  4:00 UTC (permalink / raw)



I'm involved in a project to port some code to 64 bit architectures and
we are getting pretty good results on an R10000 200MHz processor.  The
same code compiled with gcc on our Alpha 533 runs about the same speed. 
We have put optimisations in to utilise two pipelines although the SGI
compiler does do re-ordering of instructions for itself too.

I guess, considering the 21164 has two integer pipelines like the MIPS
and more than double the clock speed we would have expected about double
the performance but we're not seeing that.

I tried egcs but the code was actually slower! :-(

We don't have a license for DEC UNIX so that option is out by the way.

I guess the other option is to optimise the main loop of the code by
hand and in that case I could do with some pointers to details of the
processor instruction set including clock timings and the likes, so far
I have only been able to find the most basic information.  Trying to
download anything from digital is a nightmare, talk about slow!!!

I do have to say I am generally very pleased with the performance of the
machine though and am asking for this so I can really make the thing
hum! :-)

-- 
Dr. Shane Sturrock - sss@holyrood.ed.ac.uk
kernel: Calibrating delay loop.. ok - 529.53 BogoMIPS
Mmmmmmmmmmm :-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Best compiler for 64bit code on alpha-linux
  1998-05-10  4:00 Best compiler for 64bit code on alpha-linux Shane Steven Sturrock
@ 1998-05-10  4:00 ` Toon Moene
  1998-05-12  4:00   ` S S Sturrock
  1998-05-12  4:00 ` Steve Peltz
  1998-05-13  4:00 ` Paul Tomblin
  2 siblings, 1 reply; 9+ messages in thread
From: Toon Moene @ 1998-05-10  4:00 UTC (permalink / raw)



Shane Steven Sturrock <Shane.Sturrock@ed.ac.uk> wrote:

> I tried egcs but the code was actually slower! :-(

> I guess the other option is to optimise the main loop of the code by
> hand and in that case I could do with some pointers to details of the
> processor instruction set including clock timings and the likes, so far
> I have only been able to find the most basic information. 

The yet-an-other option :-) is to put your code for public review, so that we 
can pinpoint why it's slower ....

Seriously, without looking at your code, guessing why gcc (which version ?) 
compiled it to better code than egcs (which one ?) is just, err, guessing ...

-- 
Toon Moene (mailto:toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: mailto:fortran@gnu.org; NWP: http://www.knmi.nl/hirlam



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Best compiler for 64bit code on alpha-linux
  1998-05-10  4:00 Best compiler for 64bit code on alpha-linux Shane Steven Sturrock
  1998-05-10  4:00 ` Toon Moene
@ 1998-05-12  4:00 ` Steve Peltz
  1998-05-13  4:00   ` S S Sturrock
  1998-05-13  4:00 ` Paul Tomblin
  2 siblings, 1 reply; 9+ messages in thread
From: Steve Peltz @ 1998-05-12  4:00 UTC (permalink / raw)



In article <3555F69A.4A103962@ed.ac.uk>,
Shane Steven Sturrock  <Shane.Sturrock@ed.ac.uk> wrote:
>We don't have a license for DEC UNIX so that option is out by the way.

Too bad; some of my code is about 20-30% faster using the DEC compiler.
I don't think the gcc optimizer for the Alpha is very aggressive about
re-ordering instructions; in the DEC compiler, most of that is done by
the assembler; branch prediction is also very important, as are cache
conflicts.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Best compiler for 64bit code on alpha-linux
  1998-05-10  4:00 ` Toon Moene
@ 1998-05-12  4:00   ` S S Sturrock
  0 siblings, 0 replies; 9+ messages in thread
From: S S Sturrock @ 1998-05-12  4:00 UTC (permalink / raw)



Toon Moene wrote:

> The yet-an-other option :-) is to put your code for public review, so that we
> can pinpoint why it's slower ....

Ah, well, I wish....

Unfortunately this is a commercial product and is being aimed at a
number of OSs.  Since my fave is Linux I wanted to do a version for the
alpha.
> 
> Seriously, without looking at your code, guessing why gcc (which version ?)

gcc version 2.7.2.3

> compiled it to better code than egcs (which one ?) is just, err, guessing ...

Yeah.  Figured as much.  Looks like my best bet is going to be to
compile the code to the best of my ability with gcc and then get in and
dig around in the assembly code to see if I can really make this thing
hum.  Still looking for a good source of the instruction set....

-- 
Dr. Shane Sturrock - sss@holyrood.ed.ac.uk
kernel: Calibrating delay loop.. ok - 529.53 BogoMIPS
Mmmmmmmmmmm :-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Best compiler for 64bit code on alpha-linux
  1998-05-12  4:00 ` Steve Peltz
@ 1998-05-13  4:00   ` S S Sturrock
  1998-05-13  4:00     ` James H. Cloos Jr.
  0 siblings, 1 reply; 9+ messages in thread
From: S S Sturrock @ 1998-05-13  4:00 UTC (permalink / raw)



Steve Peltz wrote:
> 
> In article <3555F69A.4A103962@ed.ac.uk>,
> Shane Steven Sturrock  <Shane.Sturrock@ed.ac.uk> wrote:
> >We don't have a license for DEC UNIX so that option is out by the way.
> 
> Too bad; some of my code is about 20-30% faster using the DEC compiler.
> I don't think the gcc optimizer for the Alpha is very aggressive about
> re-ordering instructions; in the DEC compiler, most of that is done by
> the assembler; branch prediction is also very important, as are cache
> conflicts.

Figured as much.  Looking at the output of the SGI compiler on our
R10000 box it does lots of reordering of instructions and tries to fill
both integer pipelines to the best of its ability.

Does gcc or egcs even know about the dual pipelines of a 21164?

What happens when the 21264 starts appearing in numbers and we get two
more to play with?

-- 
Dr. Shane Sturrock - sss@holyrood.ed.ac.uk
kernel: Calibrating delay loop.. ok - 529.53 BogoMIPS
Mmmmmmmmmmm :-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Best compiler for 64bit code on alpha-linux
  1998-05-10  4:00 Best compiler for 64bit code on alpha-linux Shane Steven Sturrock
  1998-05-10  4:00 ` Toon Moene
  1998-05-12  4:00 ` Steve Peltz
@ 1998-05-13  4:00 ` Paul Tomblin
  1998-05-13  4:00   ` Michal Jaegermann
  2 siblings, 1 reply; 9+ messages in thread
From: Paul Tomblin @ 1998-05-13  4:00 UTC (permalink / raw)



In a previous article, Shane Steven Sturrock <Shane.Sturrock@ed.ac.uk> said:
>I tried egcs but the code was actually slower! :-(

Stay away from egcs.  I compiled my kernel with it (1.0.2) (with NO changes in
config, I might add), and suddenly X wouldn't start and the machine would only
recognize 21Mb of the installed 96Mb of RAM.  I went back to the old kernel
and everything was fine again.

I compiled QT and QTScape with it, and it core dumps immediately.  I took egcs
off my system and reinstalled gcc, and recompiled, and now QTScape works ok.

What a total waste of time and effort.

-- 
Paul Tomblin, ptomblin@xcski.com.
"The day Microsoft makes something that doesn't suck is probably the day they
start making vacuum cleaners" - Ernst Jan Plugge



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Best compiler for 64bit code on alpha-linux
  1998-05-13  4:00 ` Paul Tomblin
@ 1998-05-13  4:00   ` Michal Jaegermann
  1998-05-13  4:00     ` Toon Moene
  0 siblings, 1 reply; 9+ messages in thread
From: Michal Jaegermann @ 1998-05-13  4:00 UTC (permalink / raw)



Paul Tomblin (ptomblin@canoe.xcski.com) wrote:
: In a previous article, Shane Steven Sturrock <Shane.Sturrock@ed.ac.uk> said:
: >I tried egcs but the code was actually slower! :-(

: Stay away from egcs.  I compiled my kernel with it (1.0.2) (with NO changes in
: config, I might add), and suddenly X wouldn't start and the machine would only
: recognize 21Mb of the installed 96Mb of RAM.  

I am not sure if you can blame egcs for that.  I used and am using
a number of kernels compiled with egcs (1.0.2 as well) on various alphas
(LX, EB164, EB64+ so far).  The biggest one had 1 Gig of RAM (or it was
"only" 1/2 Gig?).  Not ever observed any ill effects; quite to the
contrary.

Just another data point.

: What a total waste of time and effort.

When you need Fortran and C++ running then you really do not have
a choice.  BTW - I run a number of Fortran programs, as requested by 
various people, compiled with egcs based g77 and do not know of any
problems attributable directly to a compiler.

 Michal




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Best compiler for 64bit code on alpha-linux
  1998-05-13  4:00   ` S S Sturrock
@ 1998-05-13  4:00     ` James H. Cloos Jr.
  0 siblings, 0 replies; 9+ messages in thread
From: James H. Cloos Jr. @ 1998-05-13  4:00 UTC (permalink / raw)



>>>>> "Steve" == S S Sturrock <sss@holyrood.ed.ac.uk> writes:

Steve> What happens when the 21264 starts appearing in numbers and we
Steve> get two more to play with?

The '264 has out of order execution, branch prediction, etc.  With
luck poorly optimized code will still tend to fill up the pipelines.

(One can hope. :)

-JimC
-- 
James H. Cloos, Jr.
<cloos@jhcloos.com>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Best compiler for 64bit code on alpha-linux
  1998-05-13  4:00   ` Michal Jaegermann
@ 1998-05-13  4:00     ` Toon Moene
  0 siblings, 0 replies; 9+ messages in thread
From: Toon Moene @ 1998-05-13  4:00 UTC (permalink / raw)



michal@gortel.phys.ualberta.ca (Michal Jaegermann) wrote:

[ 'bout egcs ]

> When you need Fortran and C++ running then you really do not have
> a choice.  BTW - I run a number of Fortran programs, as requested by 
> various people, compiled with egcs based g77 and do not know of any
> problems attributable directly to a compiler.

Thanks for the kind words :-)

However, to really be straight:  It is still possible to come up with a 
Fortran program using negative array indices and bounds that breaks on 
egcs-1.0.2.  Needless to say, this will be repaired in egcs-1.0.3, which will 
appear on the archives any moment now ...

-- 
Toon Moene (mailto:toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: mailto:fortran@gnu.org; NWP: http://www.knmi.nl/hirlam



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1998-05-13  4:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-05-10  4:00 Best compiler for 64bit code on alpha-linux Shane Steven Sturrock
1998-05-10  4:00 ` Toon Moene
1998-05-12  4:00   ` S S Sturrock
1998-05-12  4:00 ` Steve Peltz
1998-05-13  4:00   ` S S Sturrock
1998-05-13  4:00     ` James H. Cloos Jr.
1998-05-13  4:00 ` Paul Tomblin
1998-05-13  4:00   ` Michal Jaegermann
1998-05-13  4:00     ` Toon Moene

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox