home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol078 / benchmk.doc < prev    next >
Encoding:
Text File  |  1985-02-10  |  5.4 KB  |  117 lines

  1.                         THE BENCHMARKS
  2.  
  3. The  benchmarks are extracted from a paper to be presented  by 
  4. Dr.  M.  R.  Wigan  at the 1982 MICSIG conference in Canberra, 
  5. August 18-20. If you'd like to know more about the benchmarks, 
  6. make sure you get to MICSIG.
  7.  
  8. The  SYSOP rewrote the "C" benchmarks to eliminate the  "goto" 
  9. statements.  I  don't  believe  that it is fair  to  burden  a 
  10. structured  language  like "C" or PASCAL with constructs  like 
  11. "goto"  in benchmarks.  As "goto"s in these languages are  not 
  12. intended  for  anything but desperation  situations  (such  as 
  13. error   exits  from  deeply  nested  functions)  there  is  no 
  14. incentive   for   the  author  to  code   "goto"   efficently. 
  15. The  efficency  of coding in structured languages  often  goes 
  16. into the constructs which allow for clear program control.
  17.  
  18. Perhaps  some  PASCAL  fan will rewrite  the  PASCAL  routines 
  19. similarly.  Is  some one intersted in rewriting the  bechmarks 
  20. into RATFOR? Feedback on your results for any of the benchmark 
  21. series  (with full details of the hardware environment)  would 
  22. be interesting.
  23.  
  24. Now its over to Mark for his description of the bechmarks.
  25.  
  26.  
  27. BENCHMARKS AND ENVIRONMENTS
  28.  
  29. The benchmarks used have been published in a number of places. 
  30. The two primary sources are Coll (1978) and Fox (1980).
  31.  
  32. The  first  source was John Coll's paper in the 27  July  1978 
  33. issue  of Computing Europe (later issued in the proceedings of 
  34. the Do-It-Yourself Computing Conference,  OnLine  Conferences, 
  35. Uxbridge,UK). Coll presented the results of numerous runs done 
  36. on eight simple programs written in BASIC on a large number of 
  37. machines. Seven of these programs had previously been used for 
  38. an earlier article in the June 1977 issue of Kilobaud. As Coll 
  39. pointed out ,  although his eighth program added trancendental 
  40. functions  to  the range of tests,  there was still no  string 
  41. handling  program included in this  expanded  set.  Australian 
  42. Personal   Computing  1(4)  p14  lists  these  codes   without 
  43. crediting  the  original  author  or  noting  their   previous 
  44. history.
  45.  
  46. The second source for benchmark checks was given by Tom Fox in 
  47. the   June   1980   issue  of    Interface   Age,   where   an 
  48. (intentionally)   crude  prime number routine was given as  an 
  49. exerciser  for  the  basic  BASIC  integer  functions.    This 
  50. benchmark has,  in spite of its simplicity and crudity of code 
  51. (perhaps  even  because of it..)  attracted  numerous  further 
  52. reports by readers in subsequent issues of that magazine.
  53.  
  54. The  benchmarks themselves are very simple,  and are  designed 
  55. explicitly for lucidity in interpretation of the results.  The 
  56. credit  for this should of course go to the original  authors. 
  57. It   should  be  emphasised  that  the  previously   published 
  58. benchmarks   were  in  BASIC  only.   The  simplicity  of  the 
  59. benchmarks  might  have  been  expected to  lead  to  an  easy 
  60. translation to other languages...  but such was not the  case. 
  61. The 8080 APL implementation to hand took 561 seconds for BM9 - 
  62. the  Prime Number routine - is perhaps the  least  transparent 
  63. recoding,  but  the  same  (enforced) variations  produced  to 
  64. satisfy  each  language  were  applied to  all  the  different 
  65. compilers of that type.  The major exceptions were for  Pascal 
  66. and  its'  variants.  The label construction was  enabled  for 
  67. Pascal  and Structured-Algol,  which - while not in the spirit 
  68. of  either langauge - was certainly there in the flesh  to  be 
  69. exploited in the name of strict comparability!
  70.  
  71.  
  72. BENCHMARK SPECIFICATIONS
  73.  
  74. Benchmark BM1 : A null-action FOR, REPEAT or DO loop, executed 
  75.                 1000 times.
  76.  
  77. Benchmark BM2 : A  null-action explicitly-coded loop  executed 
  78.                 1000 times.
  79.  
  80. Benchmark BM3 : BM2 plus A=K/K*K+K-K in the loop.
  81.  
  82. Benchmark BM4 : BM2 plus A=K/2*3+4-5 in the loop.
  83.  
  84. Benchmark BM5 : BM4  plus  a branch to null-action  subroutine 
  85.                 from inside the loop.
  86.  
  87. Benchmark BM6 : BM5  plus  an array declaration  M(5),  and  a 
  88.                 null-action  FOR  loop (of 1-5)  also  in  the 
  89.                 loop.
  90.  
  91. Benchmark BM7 : BM6 plus M(L)=A in this 1-5 loop.
  92.  
  93. Benchmark BM8 : A  square  function,   log  function  and  sin 
  94.                 function  in  an  explicitly-coded  FOR  loop, 
  95.                 repeated 100 times.
  96.  
  97. Benchmark BM9 : Prime  numbers in the range 1-1000 are printed 
  98.                 to the screen,  calculated in an outer loop of 
  99.                 1000 and an inner loop of 500,  with no tricks 
  100.                 at  all.  This  is  a very  bad  prime  number 
  101.                 routine  indeed,  but a very useful basis  for 
  102.                 inter-machine,    interpreter   and   compiler 
  103.                 comparisons. 
  104.  
  105. The  output of numbers to the screen required by BM9 can  slow 
  106. the execution speed of this benchmark.  The "standard"  screen 
  107. speed  was therefore set to be 19,200 baud wherever  possible. 
  108. In  some cases of fast execution the screen handling  overhead 
  109. proved  to  be a major delay factor.  The Z8000 4MHz  AMC  "C" 
  110. integer  benchmark  runs suffered up to 25% delay  under  some 
  111. situations.
  112.  
  113. [End of Document]
  114.   an  explicitly-coded  FOR  loop, 
  115.                 repeated 100 times.
  116.  
  117. Benchmark BM9 : Prime  numbers in the range 1-1000