also gcc 3.4.6 will das pi_css5 bei mir nicht compilieren an der IPC, und Sun Compiler zu installieren dauert wieder over 9000 minuten, darauf hab ich jetz keine lust
stattdessen kommt nun meine Alpha Workstation zum Zug
667MHz 21264A CPU, 1GB RAM, DIGITAL Unix 4.0E, Java 1.3 (braucht offiziell 4.0F oder neuer, aber wenn man die versionschecks aus den setup-skripten einfach weglöscht, dann gehts :))
Spoiler anzeigen
mit dem JIT von Sun
xp1000> java -classic pi_fftcs 1000000
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave
initializing...
nfft= 262144
radix= 10000
error_margin= 0.006286438480884726
calculating 1048576 digits of PI...
AGM iteration
precision= 48: 3.78 sec
precision= 80: 3.77 sec
precision= 176: 3.80 sec
precision= 352: 3.80 sec
precision= 688: 3.78 sec
precision= 1392: 3.79 sec
precision= 2784: 3.78 sec
precision= 5584: 3.81 sec
precision= 11168: 3.79 sec
precision= 22336: 3.79 sec
precision= 44688: 3.78 sec
precision= 89408: 3.80 sec
precision= 178816: 3.79 sec
precision= 357648: 3.81 sec
precision= 715312: 3.76 sec
precision= 1430640: 3.78 sec
writing pi1048576.txt
87.15 sec. (real time)
Alles anzeigen
Spoiler anzeigen
mit dem angepassten FastVM JIT von Compaq
xp1000> java pi_fftcs 1000000
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave
initializing...
nfft= 262144
radix= 10000
error_margin= 0.006286438480884726
calculating 1048576 digits of PI...
AGM iteration
precision= 48: 2.61 sec
precision= 80: 2.60 sec
precision= 176: 2.60 sec
precision= 352: 2.60 sec
precision= 688: 2.60 sec
precision= 1392: 2.60 sec
precision= 2784: 2.60 sec
precision= 5584: 2.60 sec
precision= 11168: 2.60 sec
precision= 22336: 2.60 sec
precision= 44688: 2.61 sec
precision= 89408: 2.59 sec
precision= 178816: 2.60 sec
precision= 357648: 2.60 sec
precision= 715312: 2.60 sec
precision= 1430640: 2.59 sec
writing pi1048576.txt
50.04 sec. (real time)
Alles anzeigen
50.04sec 
jetzt noch nativ, compiliert mit dem beim OS beiliegenden compiler und CFLAGS=-fast -non_shared -tune=ev6
Spoiler anzeigen
xp1000> pi_css5 1000000
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave
initializing...
nfft= 262144
radix= 10000
error_margin= 0.00611182
calculating 1048576 digits of PI...
AGM iteration
precision= 48: 1.98 sec
precision= 80: 1.97 sec
precision= 176: 1.97 sec
precision= 352: 1.98 sec
precision= 688: 1.98 sec
precision= 1392: 1.97 sec
precision= 2784: 1.97 sec
precision= 5584: 1.97 sec
precision= 11168: 1.97 sec
precision= 22336: 1.97 sec
precision= 44688: 1.97 sec
precision= 89408: 1.97 sec
precision= 178816: 1.98 sec
precision= 357648: 1.95 sec
precision= 715312: 1.97 sec
precision= 1430640: 1.98 sec
writing pi1048576.txt...
36.92 sec. (real time)
Alles anzeigen
36.92sec
Das Ergebnis von Java im Vergleich zum nativen C-Code ist echt beachtlich in dem Fall!
EDIT: der vollständigkeit halber mal noch die nbench-ergebnisse von der Kiste
Spoiler anzeigen
BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)
TEST : Iterations/sec. : Old Index : New Index
: : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT : 495.17 : 12.70 : 4.17
STRING SORT : 60.84 : 27.18 : 4.21
BITFIELD : 1.0415e+08 : 17.87 : 3.73
FP EMULATION : 14.712 : 7.06 : 1.63
FOURIER : 11393 : 12.96 : 7.28
ASSIGNMENT : 6.0593 : 23.06 : 5.98
IDEA : 1294.2 : 19.79 : 5.88
HUFFMAN : 569.4 : 15.79 : 5.04
NEURAL NET : 10.406 : 16.72 : 7.03
LU DECOMPOSITION : 366.59 : 18.99 : 13.71
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX : 16.361
FLOATING-POINT INDEX: 16.022
Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU : 667MHz 21264A
L2 Cache : 4MB
OS : DIGITAL UNIX V4.0E
C compiler : cc
libc :
MEMORY INDEX : 4.545
INTEGER INDEX : 3.767
FLOATING-POINT INDEX: 8.887
Baseline (LINUX) : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
* Trademarks are property of their respective holder.
Alles anzeigen