700 MHZ G3 v. 700 MHz Athlon Thunderbird

I own an Apple ibook with a 700 MHz G3 and a 14" screen (full technical stats). I also have a 700 MHz Athlon Thunderbird: Asus A7V motherboard, 896mb RAM, Western Digital hard drive. Both systems have Gentoo Linux 1.2 installed on them.

The G3 has a 512K L2 cache, the Athlon's is only 256. The athlon has a faster bus (200MHz I believe compared to 100MHz for the ibook).

This is an irresistible opportunity to compare performance of the two architetctures! Same Operating System, same clock speed, same compiler (although with different code generators). Send all suggestions/code for benchmarks to me.

So far these are pretty much 'toy benchmarks' but they're still fun. At least the seti client is sort of a real app. :)


on the athlon "gcc -v" outputs

6:04am0raven:/<1>local/src/mac>gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs Configured with: /var/tmp/portage/gcc-3.2.1/work/gcc-3.2.1/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/include/g++-v32 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext
Thread model: posix
gcc version 3.2.1

on my athlon I use "-march=athlon-tbird -O3 -pipe -fomit-frame-pointer" as my CXXFLAGS and CFLAGS.

on the ibook "gcc -v" outputs

7:20am1quasar:~>gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.2.1/specs
Configured with: /var/tmp/portage/gcc-3.2.1/work/gcc-3.2.1/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu --target=powerpc-unknown-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/include/g++-v32 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext
Thread model: posix
gcc version 3.2.1

on the ibook I use "-mcpu=750 -O3 -pipe -fsigned-char -mpowerpc-gfxopt" as my CXXFLAGS and CFLAGS.

in Mac OS X I use the same CFLAGS and CXXFLAGS as on gentoo.

11:18pm0quasar:~%gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1161, based on gcc version 3.1 20020420 (prerelease)


I ran the C++ benchmarks from here.

athlon:
68.162u 0.015s 1:19.48 85.7% 0+0k0+0io 357pf+0w

G3, gentoo linux:
109.780u 0.020s 1:55.32 95.2% 0+0k0+0io 576pf+0w

G3, Mac OS X:
75.270u 0.670s 1:59.74 63.4% 0+0k0+3io 0pf+0w

wow! apple seems to have seriously beefed up the optimizer in gcc! I hope the patches will be getting into the main tree soon! (gcc is GPL right, so Apple has to release any changes they've made to gcc??) I was even downloading the starshipexeter quicktime movies during the Mac OS X run (which is why it only got 63% CPU time)

Also, zhenlin from the Gentoo forums ran this code on his
PowerPC G4 700MHz LCD iMac vintage Sep 2002
in single-user mode Mac OS X/Darwin [Apple+S when booting OS X]

Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1175, based on gcc version 3.1 20020420 (prerelease)
CXXFLAGS="-mcpu=7450 -O3 -pipe -fsigned-char -mpowerpc-gfxopt -faltivec"
96.56user 0.04system 1:36.82elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k


Old timings using gcc 2.95:

"gcc -v" outputs

gcc version 2.95.3 20010315 (release)

Seti client timing. Using this work unit.

athlon:
33905.420u 84.384s 9:30:00.10 99.3% 0+0k0+0io 181pf+0w 0max
9.418 hours of cpu time.

g3:
53874.590u 202.320s 15:13:36.39 98.6% 0+0k0+0io 249pf+0w 0max
14.97 hours of cpu time.

It took the g3 about 145.5% as much time as the athlon.


Prime number generation, using the sieve of Eratosthenes. Uses integer addition, integer multiplication, and bit operations, no division. the code

g3:
in 16 seconds, found 5761455 primes less than 100000000
11.130u 0.270s 0:16.76 68.0% 0+0k0+0io 412pf+0w 0max

athlon:
in 12 seconds, found 5761455 primes less than 100000000
11.646u 0.154s 0:13.76 85.6% 0+0k0+0io 301pf+0w 0max

after re-runs, to "heat up" all the caches:

g3:
in 14 seconds, found 5761455 primes less than 100000000
11.120u 0.110s 0:15.69 71.5% 0+0k0+0io 412pf+0w 0max

athlon:
in 12 seconds, found 5761455 primes less than 100000000
11.690u 0.137s 0:13.83 85.4% 0+0k0+0io 301pf+0w 0max


Generates permutations. recursion, loops, moving characters around. the code

g3:
time jumble aaeiilnnnortt |wc
187014432 187014432 2618202048
94.330u 5.040s 2:42.67 61.0% 0+0k0+0io 396pf+0w 0max
146.830u 10.100s 2:42.66 96.4% 0+0k0+0io 781pf+0w 0max

athlon:
time jumble aaeiilnnnortt |wc
187014432 187014432 2618202048
109.888u 3.393s 3:07.56 60.3% 0+0k0+0io 288pf+0w 0max
162.603u 7.033s 3:07.55 90.4% 0+0k0+0io 549pf+0w 0max

after re-runs, to "heat up" all the caches:

g3:
time jumble aaeiilnnnortt | wc
187014432 187014432 2618202048
93.490u 4.950s 2:42.46 60.5% 0+0k0+0io 396pf+0w 0max
146.950u 10.160s 2:42.45 96.7% 0+0k0+0io 781pf+0w 0max

athlon:
time jumble aaeiilnnnortt | wc
187014432 187014432 2618202048
110.280u 3.439s 3:07.49 60.6% 0+0k0+0io 288pf+0w 0max
162.865u 6.934s 3:07.49 90.5% 0+0k0+0io 549pf+0w 0max

Last updated: [an error occurred while processing this directive]


to Kevin's Gentoo on PPC page
to Kevin's page