home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / euphor10.zip / BENCH.DOC < prev    next >
Text File  |  1993-06-24  |  3KB  |  82 lines

  1.             Benchmarks
  2.             ----------
  3.  
  4.  In this directory we've provided some benchmark programs written in
  5.  Euphoria, C, Pascal and QBASIC. 
  6.  
  7.  You will need a C or Pascal compiler to compile and run the C or Pascal
  8.  benchmarks. QBASIC will be available on your system if you have MS-DOS 5.0
  9.  or later. type: 
  10.     QBASIC /RUN <filename>.BAS 
  11.  Be aware that we've set the number of iterations for QBASIC to a 
  12.  lower value, because it is so slow compared to Euphoria.
  13.  
  14.  The .pro files show the output from the Euphoria profiler for a single
  15.  iteration of each benchmark, so you can see where the time is actually spent. 
  16.  The ed editor displays .pro files in color.
  17.  
  18.  We've also included a "filesort.ex" example program that is several times 
  19.  faster than the MS-DOS sort command, and can handle much larger files. 
  20.  
  21.  We encourage you to compare Euphoria against any interpreted or compiled
  22.  language that you are interested in. Euphoria is *FAST* -- 10 to 15 times
  23.  faster than QBASIC -- but don't take our word for it. Make your own 
  24.  measurements on your own machine. It's a good way to start programming in 
  25.  Euphoria.
  26.  
  27.  About The Benchmarks
  28.  --------------------
  29.  sieve is the classic Byte magazine benchmark first published 10 years ago. It
  30.        generates a list of prime numbers using the sieve technique.
  31.  
  32.  shell is a sort of 50 small integers using the Shell sort technique.
  33.  
  34.  database is a series of transactions against a small in-memory data structure
  35.        that must sometimes grow or shrink as information is added, deleted or
  36.        updated.
  37.  
  38.  sieve and shell involve simple operations on fixed-size arrays of small 
  39.  integers. database involves integer, string and floating-point operations. 
  40.  database also requires dynamic storage allocation - something fundamental to 
  41.  the design of Euphoria.  
  42.  
  43.  The version of Pascal that we used was not flexible enough for the database 
  44.  benchmark, so there is no database.pas file.
  45.   
  46.  When benchmarking Euphoria programs you should include the statement
  47.  "without type_check" at the top of the main file. This gives permission
  48.  to Euphoria to simplify or remove some runtime type checking. 
  49.  An unexplained machine exception will still be impossible, 
  50.  and as always, subscript checking, uninitialized variable checking, 
  51.  integer overflow checking, stack overflow checking, and all other checks
  52.  are still performed.
  53.  
  54.  Comparison with QBASIC
  55.  ---------------------- 
  56.  We made our measurements on a 486DX-50 with 256K cache. Your results could 
  57.  vary slightly up or down from ours. We tried both the version of QBASIC that
  58.  comes with MS-DOS 5.0 and the version that comes with MS-DOS 6.0. There was no
  59.  difference in speed. 
  60.  
  61. -------------------------------------------------------------------------------
  62.  
  63.         Euphoria 1.0 Public Domain Edition (E)
  64.                     vs 
  65.                 Microsoft QBASIC (Q)
  66.  
  67.   <--  slower     -------  RELATIVE SPEED    -------     faster -->
  68.  
  69.          sieve
  70.   QQQQ
  71.   EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  (9.7x)
  72.  
  73.            shell
  74.   QQQQ
  75.   EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  (13.5x)
  76.  
  77.            database
  78.   QQQQ
  79.   EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  (14.8x)
  80.  
  81. -------------------------------------------------------------------------------
  82.