home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 91 / af091a.adf / af91a3.lzx / prgs / BenchMarks / pcwall.b < prev    next >
Text File  |  2019-03-25  |  1KB  |  104 lines

  1. rem $EVENT OFF
  2. rem $option n-o-a-x-
  3.  
  4. rem Modified for ACE BASIC, 27.03.1993 (occurrences of t! changed to t)
  5.  
  6. print "All the old PCW Benchmarks..."
  7.  
  8. dim times(8)    ' to hold the times
  9.  
  10.    t=timer
  11.    FOR K=1 TO 10000
  12.    NEXT K
  13.    t=timer-t:times(1)=t
  14.  
  15.  
  16.    t=timer
  17.    K=0
  18. z1:
  19.    K=K+1
  20.  IF K<10000 THEN GOTO z1
  21.   
  22.    t=timer-t:times(2)=t
  23.  
  24.  t=timer
  25.    K=0
  26. z2:
  27.  K=K+1
  28.  A=(k/k)*k+K-K
  29.     IF K<10000 THEN GOTO z2
  30.    t=timer-t:times(3)=t
  31.  
  32.    t=timer
  33.    K=0
  34. z3:
  35.  K=K+1
  36.  A=K/2*3+4-5
  37.     IF K<10000 THEN GOTO z3
  38.    t=timer-t:times(4)=t
  39.  
  40.    t=timer
  41.    K=0
  42. z4:
  43.      K=K+1
  44.      A=K/2*3+4-5
  45.     GOSUB s4
  46.     IF K<10000 THEN GOTO z4
  47.     t=timer-t:times(5)=t
  48.     goto skip1
  49. s4:
  50.      RETURN
  51. skip1:
  52.  
  53.     t=timer
  54.     K=0
  55.     DIM M(5)
  56. z5:
  57.     K=K+1
  58.     A=K/2*3+4-5
  59.     GOSUB s3
  60.     FOR L=1 TO 5
  61.     NEXT L
  62.      IF K<10000 THEN GOTO z5
  63.     t=timer-t:times(6)=t
  64.     goto  skip2
  65. s3:
  66.      RETURN
  67.  
  68. skip2:
  69.     t=timer
  70.     K=0
  71.     DIM M1(5)
  72. z6:
  73.      K=K+1
  74.     A=K/2*3+4-5
  75.     GOSUB s6
  76.     FOR L=1 TO 5
  77.     M1(L)=A
  78.     NEXT L
  79.     IF K<10000 THEN GOTO z6
  80.     t=timer-t:times(7)=t
  81.     
  82. goto skip3
  83.  
  84. s6:
  85.  RETURN
  86.  
  87. skip3:
  88.     t=timer
  89.     K=0
  90. z7:    K=K+1
  91.     A=K^2
  92.     B=LOG(K)
  93.     C=SIN(K)
  94.     IF K<10000 THEN GOTO z7
  95.    t=timer-t:times(8)=t
  96.  
  97. t=0
  98. for i%=1 to 8
  99. print "PCW";i%,times(i%)/10
  100. t=t+times(i%)
  101. next i%
  102. print "Average=";t/80
  103.  
  104.