Sunday, March 26, 2006

gmp on MacIntel and on G4

My iMac should be "twice as fast" as the iMac G5. Ok, that good.
This is true if you use apple software (i suppose they did the test correctly) and if you benchmark with SPEC suites. That's good.And the iMac is fast. I have never used a faster mac (however, I never used a G5 too). Applications open with no need to wait and so on. I can even play 3d games with rosetta.

However right at the moment I have to use gmp. And gmp says that my brand new iMac is not even twice as fast as my "old" PB G4 1.5 GHz. That is a desktop. I know, gmp on Mac Intel uses no assembly code. And the iMac is 1.5 x slower.

But I don't care how much my CPU is fast if the software I have to run is not optimized for it. Today they released gmp 4.2. I'm gonna try it and see if now the assembly issue is fixed.

iMac 2 GHz 2 GB
***** GMPbench version 0.1 ***** 
Using default CFLAGS = "-O3 -fomit-frame-pointer -I/opt/local/include" 
Using default CC = "gcc" 
Using default LIBS = "-lgmp -L/opt/local/lib" 
Using compilation command: gcc -O3 -fomit-frame-pointer -I/opt/local/include foo.c -o foo -lgmp -L/opt/local/lib 
You may want to override CC, CFLAGS, and LIBS 
Using gmp version: 4.1.4 
Compiling benchmarks 
Running benchmarks 
Category base 
Program multiply 
multiply 128 128 
GMPbench.base.multiply.128,128 result: 3388942 
multiply 512 512 
GMPbench.base.multiply.512,512 result: 283065 
multiply 8192 8192 
GMPbench.base.multiply.8192,8192 result: 2753 
multiply 131072 131072 
GMPbench.base.multiply.131072,131072 result: 43.6 
multiply 2097152 2097152 
GMPbench.base.multiply.2097152,2097152 result: 1.73 
GMPbench.base.multiply result: 2883.1 
Program divide 
divide 8192 32 
GMPbench.base.divide.8192,32 result: 116928 
divide 8192 64 
GMPbench.base.divide.8192,64 result: 72789 
divide 8192 128 
GMPbench.base.divide.8192,128 result: 36886 
divide 8192 4096 
GMPbench.base.divide.8192,4096 result: 5076 
divide 8192 8064 
GMPbench.base.divide.8192,8064 result: 66084 
divide 131072 8192 
GMPbench.base.divide.131072,8192 result: 107 
divide 131072 65536 
GMPbench.base.divide.131072,65536 result: 54.0 
divide 8388608 4194304 
GMPbench.base.divide.8388608,4194304 result: 0.159 
GMPbench.base.divide result: 1770.9 
GMPbench.base result: 2259.6 
Category app 
Program rsa 
rsa 512 
GMPbench.app.rsa.512 result: 870 
rsa 1024 
GMPbench.app.rsa.1024 result: 129 
rsa 2048 
GMPbench.app.rsa.2048 result: 18.0 
GMPbench.app.rsa result: 126.41 
GMPbench.app result: 126.41 
GMPbench result: 534.46 

PowerBook G4 1.5 GHz 512 MB
... broken post ...

No comments: