Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Andreas Johansson <ajo@wopr.campus.luth.se>
Subject: Re: Interesting gcc to cc comparison
Date: Tue, 18 Mar 1997 14:30:27 +0100 (CET)	[thread overview]
Message-ID: <e81af74a67c964e4c6ab9cc9c1ae3cd9.axp-list@archive.invalid> (raw)
In-Reply-To: <9703181310.AA03085@halfpint.rtp.avanticorp.com>

On Tue, 18 Mar 1997, Jim Nance wrote:

> Hello All,
>     I have a program here that I thought you all might be interested in.
> [...]
> two 400x400 matrices 3 times:
> 
>                 Simple          2x2             4x4
> cc              8.016346        2.849886        4.199832
> gcc -O2         12.232844       3.833180        10.182926
> gcc -O3         12.032852       3.383198        10.116262
> 
> The most interesting result is probably for the 4x4 matrices.  Gcc really
> does poorly here, and I think I might know why.  For the 4x4 case there
> are some for loops of the form for(ii=0; ii<4; ii++) which I am counting
> on the compiler to unroll so the math inside the loops can be done in
> parallel.  It suspect that this is not happening.

This is not supposed to happend unless you specify -funroll-loops, I
believe.

Anyway, I tried it on Linux with gcc 2.7.2.1. The timing is screwed up
(about 1000 times wrong :), but you can still see the relative speed:
(256x256 matrix)

gcc -O2		 	0.038493	0.011104	0.011817
gcc -O3		 	0.036401	0.010734	0.011687
gcc -O2 -funroll-loops	0.037359	0.010688	0.010967
gcc -O3 -funroll-loops	0.035515	0.010243	0.010812

So, with gcc 2.7.2.1 on Linux I don't see the phenomenon you are
describing.

This is my system for reference:
Noname axppci 266MHz 15ns, 256k cache.

--

<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
: E-mail: ajo@wopr.campus.luth.se                                       :
: S-mail: Andreas Johansson, Karhusvagen 5  6:618, 977 54 Lulea, SWEDEN :
:     Have you had your dose of 261.62 BogoMIPS today? - Run Alpha!     :
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

       reply	other threads:[~1997-03-18 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9703181310.AA03085@halfpint.rtp.avanticorp.com>
1997-03-18 13:30 ` Andreas Johansson [this message]
1997-03-20 20:30 Interesting gcc to cc comparison Claus Denk
  -- strict thread matches above, loose matches on Subject: below --
1997-03-20 20:19 Claus Denk
     [not found] <Pine.LNX.3.95L01at.970318142302.18255A-100000@wopr.campus.luth.se>
1997-03-18 13:33 ` Andreas Johansson
1997-03-18 13:10 Jim Nance
read-only archive

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