Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC 4.0.2 performance on G4/PPC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
tmazzoni
n00b
n00b


Joined: 20 Sep 2005
Posts: 21
Location: Italy

PostPosted: Wed Nov 02, 2005 2:57 pm    Post subject: GCC 4.0.2 performance on G4/PPC Reply with quote

I own a 1.5GHz / 1 GB RAM / 80MB HD Mac mini, here is its uname-a
Quote:
Linux macgnex 2.6.13-gentoo-r3 #6 SMP Fri Oct 28 18:20:12 CEST 2005 ppc 7447A, altivec supported PowerMac10,1 GNU/Linux

After doing some tests and comparing its performance with my AthlonXP 2800 running at regular 2075 MHz, 1GB, 200GB HD
Quote:
Linux gnegnex 2.6.13-gentoo-r2 #8 Tue Oct 25 18:02:12 CEST 2005 i686 AMD Athlon(tm) XP 2800+ AuthenticAMD GNU/Linux

I was a bit disappointed with the overall speed of my Gentooed Mac, especially when it comes to number crunching, definitely not proportional to the ~600MHz difference between the two systems. I know that GCC is not quite optimized for the PPC architecture, and that software more often than not contains only mmx and sse optimizations and not altivec ones.

I googled around for a while and found out that Apple has switched to GCC 4 in its XCode 2.1 IDE. I read on and found this page of particular interest:
Quote:
http://developer.apple.com/releasenotes/DeveloperTools/GCC4.html

especially when it comes to the auto-vectorization feature of GCC4 via the -ftree-vectorize flag. They also say they have set up a particular Apple version of the compiler, enabling a -fast flag which though can be implemented via a sequence of gcc flags.

So I decided to try and upgrade my compiler. I wanted to perform some benchmarks first, before changing all the libraries (glibc, binutils, etc) so that the comparison could be as accurate as possible, namely I chose PovBench, which as any benchmark is incomplete but... Let's see the results before I changed anything, and after updating compiler etc.

Quote:

Before: gcc-3.4.4-r1, glibc-2.3.5-r3, binutils-2.16.1, gcc flags=-O2 -pipe -mcpu=7450 -mtune=7450 -mabi=altivec -mpowerpc-gfxopt

    Total Scene Processing Times
    Parse Time: 0 hours 0 minutes 4 seconds (4 seconds)
    Photon Time: 0 hours 1 minutes 21 seconds (81 seconds)
    Render Time: 1 hours 10 minutes 18 seconds (4218 seconds)
    Total Time: 1 hours 11 minutes 43 seconds (4303 seconds)

After: gcc-4.0.2-r1, glibc-2.3.5.20050722, binutils-2.16.91.0.3, gcc flags=-O2 -pipe -mcpu=7450 -mtune=7450 -mabi=altivec -mpowerpc-gfxopt -ftree-vectorize

    Total Scene Processing Times
    Parse Time: 0 hours 0 minutes 3 seconds (3 seconds)
    Photon Time: 0 hours 1 minutes 6 seconds (66 seconds)
    Render Time: 1 hours 1 minutes 15 seconds (3675 seconds)
    Total Time: 1 hours 2 minutes 24 seconds (3744 seconds)

Note that I downloaded povray-3.6 from its own site and compiled it with the --disable-optimiz option in both cases.

I think that 12% faster is a stunning result, all the rest being equal. Well... I cheated, inserting the -ftree-vectorize flag for compiling with gcc 4.0.2 to exploit the vector capabilities of my PPC, but it wouldn't have been fun if I hadn't. Without the -ftree-vectorize, the total time is still 4 minutes less than the original version.

So much for the compilation issues and times on x86 platforms with GCC 4. It looks to me that on PPC systems this new version of the compiler gives great results. After all, this makes sense otherwise Apple wouldn't switch to it.

I know this is only a partial test, but it speaks for itself. I am going to make some other comparisons (nbench, acovea) and please help me in finding other benchmarking software. It'd be fun to get the hands on the Apple version of the compiler, and see if it performs even better.

Let me know what you think. After all, we're here for speed, aren't we.
Back to top
View user's profile Send private message
spinner
n00b
n00b


Joined: 30 Sep 2005
Posts: 46

PostPosted: Wed Nov 02, 2005 3:58 pm    Post subject: Reply with quote

The big thing with gcc 4 is the vectorizer ..With it we can feel the power of altivec without having to write low level Altivec code.
I have compiled gcc 4.0.2 but haven't found time yet to make tests.
Back to top
View user's profile Send private message
sktrdie
Apprentice
Apprentice


Joined: 13 Mar 2005
Posts: 153

PostPosted: Wed Nov 02, 2005 5:16 pm    Post subject: Re: GCC 4.0.2 performance on G4/PPC Reply with quote

tmazzoni wrote:
So much for the compilation issues and times on x86 platforms with GCC 4. It looks to me that on PPC systems this new version of the compiler gives great results. After all, this makes sense otherwise Apple wouldn't switch to it.


PowerPC can't be compared as a fast architecture, it is more likely to be compared on it's great stability, flexibility and productivity.
Why do you think Apple is what it is today, mostly thanks to PPC and it's great ability.
Back to top
View user's profile Send private message
Sodki
Guru
Guru


Joined: 11 Aug 2003
Posts: 419
Location: London, U.K. & Lisbon, Portugal

PostPosted: Wed Nov 02, 2005 7:48 pm    Post subject: Reply with quote

Isn't the Mac Mini equiped with a 4800 RPM disk? That could be one of the reasons for it's performance.
Back to top
View user's profile Send private message
tmazzoni
n00b
n00b


Joined: 20 Sep 2005
Posts: 21
Location: Italy

PostPosted: Wed Nov 02, 2005 8:04 pm    Post subject: Reply with quote

Sodki wrote:
Isn't the Mac Mini equiped with a 4800 RPM disk? That could be one of the reasons for it's performance.


Indeed, my Mac Mini is a bit modded. I replaced the original disk with a 7200RPM/8MB-cache Hitachi. This changed things a lot as to disk performance, but that's not my main concern now.
_________________
tommex:x86_64|2.6.28-gentoo|E6600@3000|ASUS Striker Extreme|2GB Corsair|NVIDIA 8600GT 256MB|
Back to top
View user's profile Send private message
_lior_
n00b
n00b


Joined: 29 Dec 2004
Posts: 13

PostPosted: Thu Nov 03, 2005 12:40 pm    Post subject: Reply with quote

Yes, why is my athlon-tbird (800mhz, 384mb ram) is faster than my powermac (g4-7450, 800mhz, 768mb ram) ??? :evil: :?:
Back to top
View user's profile Send private message
spinner
n00b
n00b


Joined: 30 Sep 2005
Posts: 46

PostPosted: Thu Nov 03, 2005 4:42 pm    Post subject: Reply with quote

_lior_ wrote:
Yes, why is my athlon-tbird (800mhz, 384mb ram) is faster than my powermac (g4-7450, 800mhz, 768mb ram) ??? :evil: :?:


?! is this a joke ?

Be more specific.
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Thu Nov 03, 2005 7:47 pm    Post subject: Reply with quote

Sodki wrote:
Isn't the Mac Mini equiped with a 4800 RPM disk? That could be one of the reasons for it's performance.

Depends. Mine both have a 5400 rpm Seagate. But though notebook class harddisk usually have a lower rpm they offer advantages in other areas, so rpm by itself doesn't tell the whole story. Still a 2.5" 7200 rpm hitatchi will speed things up some.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum