home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / CONTRIB / MBASE / MBASE50.TAR / mbase / sample / readme < prev    next >
Encoding:
Text File  |  1992-10-23  |  2.6 KB  |  45 lines

  1. The makefiles under this directory are (if it's possible) even harder to
  2. deal with than in ../src --but I guarantee it's all compilable.  :)
  3.  
  4. Eventually.
  5.  
  6. There are two primary toys under here, sample and bench.  Sample is really
  7. just there for example code; it happens to work, which is nice, but it's
  8. not doing its intended job unless you look under the hood.  So have at it;
  9. it's ugly code (amazing how you can always look back and say, "God, I
  10. can't believe I wrote THAT", isn't it?), but, as I said, it does work.
  11.                           ^^
  12.                           Note that I didn't put the comma inside the
  13.                           quotes.  I think that looks really stupid; it's
  14.                           not part of the quote.  New standard.  Anyone
  15.                           wanna draw up a petition?
  16.  
  17. Bench is a benchmark utility.  Run it without any arguments and it'll proceed
  18. to add 790 very simple records, one after another, to bench.rel--each '.' it
  19. prints represents 10.  Then it'll draw a pretty graph that looks like a plot
  20. of any O(n * ln(n)) function (for 5.0 anyway--try it with 4.1a and it looks
  21. pretty!  All kindsa lumps and valleys...) and tell you what the average add
  22. time is for all 790 records.  Some typical numbers, with the cache at 500
  23. (as shipped):
  24.  
  25.                                       Average time per add,  Multiple that
  26.  Machine   Software                   Versions 5.0 vs 4.1a   it's faster by
  27.  --------  -------------------------  ---------------------  --------------
  28.  NeXT      Non-turbo, 25Mhz            .27 sec vs  ???? sec      x ????
  29.  Sparc 1+  SunOS 4.1 (zzzooooom!!!)    .37 sec vs  1.16 sec      x 3.13
  30.  386/25dx  Dos 5, SMARTDRV, DublDisk  1.15 sec vs  3.17 sec      x 2.75
  31.  386/16sx  Xenix of some sort         1.27 sec vs  2.67 sec      x 2.10
  32.  
  33. So basically, the faster your processor, the better 5.0 beats the crap out of
  34. 4.1a... just what you'd expect, 'cause its primary change is that all tree
  35. balancing is done cached.  Beware, though; 790 records at even 1 sec per add
  36. is just over 13 minutes; this benchmark will take a bit of time to run.  If you
  37. change the cache size in the library it'll change the results a good bit; play
  38. with MAX_CACHE in mbase.h and see.  Optimally you'd want MAX_CACHE to be
  39. exactly as big as the number of records you intend to store; more than that
  40. would never be used, less than that and it flushes too often.  If you cut the
  41. number of records added by the benchmark to around 520, you may be able to see
  42. a bit of a peak in the plot where the cache size is...  if you have no more of
  43. a life than I do, you may wanna give it a whirl.  :|
  44.  
  45.