home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.sys.atari.st      Discussion about 16 bit Atari micros      15,439 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 14,397 of 15,439   
   Guillaume Tello to All   
   Re: [WEB] FPU vs 68LC040   
   04 Aug 10 12:22:02   
   
   From: houten.van@orange.fr   
      
   Le 03/08/2010 17:40, Götz Hoffart a écrit :   
   > Guillaume Tello  wrote:   
   >   
   >> For the OpenGL test, I think the TT48MHz + 68882 is faster than a 68LC040   
   >> 25MHz. (as the FPU is clocked at 48MHz on the TT+CaTTamaran).   
   >   
   > Do you have data for this? Higher FPU clock speed doesn't necessarily   
   > mean it's faster.   
      
   ****************First test, arithmetic******************   
      
   	Sure I have made some tests, the first one is arithmetic   
   (+,-,/,*,sqrt), I have compiled it with Pure C with 68020 option and, of   
   course, I don't use the FPU!!!   
   (source at the end of the mail named TESTREAL)   
      
   Arithmetic test (duration in seconds, 32000 iterations):   
      
   TT 68030 32MHz	        9,39   
   TT 68030 48MHz          8,12   
   MagicMAC 68LC040 25MHz  5,01   
      
   This is to be compared with the FPU use made in assembler:   
   (Source at the end of the mail named FPU_TEST in Forth+Assembler)   
      
   TT + 68882 32 MHz       0,44   
   TT + 68882 48 MHz       0,40   
      
   	Yeepa!!!   
   	So, sure the 68040 is really faster than a 68030, even with a lower   
   clock it overpasses the 68030! But, it can't compare with the power of a   
   FPU unit.   
      
   ***************Second test, scientific functions**********   
      
   	The second one uses cosins, exponential, etc...   
   (Source at the end of the mail named TESTRL2)   
      
   Scientific test (duration in seconds, 5000 iterations):   
      
   TT 68030 32MHz	        15,52   
   TT 68030 48MHz          13,30   
   MagicMAC 68LC040 25MHz   8,13   
      
   This is to be compared with the FPU use made in assembler:   
   (Source at the end of the mail named FPU_TEST in Forth+Assembler)   
      
   TT + 68882 32 MHz        0,40   
   TT + 68882 48 MHz        0,27   
      
   	The same, no comparison... the FPU is really a great thing!   
      
   	Guillaume.   
      
      
   ***********TESTREAL*********   
   With 32000 iterations, results should be close to:   
   -1 670 603 994,438....  and 396,061 ...   
      
   #include "fcntl.h"   
   #include "stdio.h"   
   #include "math.h"   
      
   main()   
   {   
   	int i,top;   
   	double a,x;   
   	unsigned char c;   
   	printf("\nNombre d'iterations:");   
   	scanf("%d",&top);   
   	a=10.0;   
   	x=1.0;   
   	for (i=0;iexport "f:\_test.s"   
      
       OPT p=68882   
      
       text   
      
   arithm:   
       dc.w 437		; to interface with FORTH   
       bsr.s init   
   .lb0:   
       fadd fp2,fp1		; a=a+x   
       fdiv fp2,fp1		; a=a/x   
       fsub fp2,fp1		; a=a-x   
       fmul fp2,fp1		; a=a*x   
       fadd fp4,fp2		; x=x+0.0123456789   
       fsqrt fp2,fp3	; fp3=sqrt(x)   
       fadd fp3,fp1		; a=a+sqrt(x)   
       dbf d0,.lb0   
   commun:   
       fmove.d fp1,-(a6)	; return values to FORTH on the stack   
       fmove.d fp2,-(a6)   
       rts   
      
   autre:   
       dc.w 437   
       bsr.s init   
   .lb0:   
       fcos fp2,fp3   
       fadd fp3,fp1		; a=a+cos(x)   
       fsin fp2,fp3   
       fadd fp3,fp1		; a=a+sin(x)   
       ftan fp2,fp3   
       fadd fp3,fp1		; a=a+tan(x)   
       flogn fp2,fp3   
       fadd fp3,fp1		; a=a+log(x)   
       fneg fp2,fp3		; -x   
       fetox fp3,fp3	; exp(-x)   
       fadd fp3,fp1		; a=a+exp(-x)   
       fadd fp4,fp2		; x=x+0.0123456789   
       dbf d0,.lb0   
       bra.s commun   
       rts   
      
   init:   
       move.l (a6)+,d0	; iterations   
       subq.l #1,d0		; for dbf   
       fmove.d (a6)+,fp4	; increment 0,0123456789   
       fmove.d (a6)+,fp1	; initial a=10   
       fmove.d (a6)+,fp2	; initial x=1   
       rts   
      
      
      
       data   
      
       dc.b "ADD_DEFS"   
       dc.l arithm,autre,-1   
       dc.b "arithm",0,"autre",0   
      
       end   
      
    >comp   
      
   0 >exec "f:\assemble\asm.ttp"   
   "f:\_test.s"   
      
   0 >include "f:\_test.prg"   
      
    >comp   
      
   : go   
       ." test arithmetique: " cr   
       timer   
       %f1 %f10 %f0.0123456789   
       32000 arithm   
       f. space f.   
       timer swap - 2/ cr .   
       cr   
       ." second test: " cr   
       timer   
       %f1 %f10 %f0.0123456789   
       5000 autre   
       f. space f.   
       timer swap - 2/ cr .   
       cr   
      
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca