home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pascal / 8051 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.6 KB  |  48 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!utcsri!newsflash.concordia.ca!sifon!thunder.mcrcim.mcgill.edu!poly-vlsi!music.mus.polymtl.ca
  3. From: Steph <CT80@music.mus.polymtl.ca>
  4. Subject: Performance questions
  5. Message-ID: <07JAN93.21000832.0034@music.mus.polymtl.ca>
  6. Lines: 37
  7. Sender: usenet@music.mus.polymtl.ca
  8. Organization: Ecole Polytechnique de Montreal
  9. Date: Fri, 8 Jan 1993 00:26:42 GMT
  10.  
  11. First off I would like to thank all of you (there was a lot!) that
  12. took the time to reply on the "User-Interface Language" question.
  13. There were a lot of different ideas, and I have yet to choose one.
  14. If you guys want it, I can post a summary of them all on this sub.
  15.  
  16. Anyway, I have two more questions for you out there.  Boy, I never
  17. stop, eh?
  18.  
  19. 1) I have seen often in 'C programs big functions separated in their
  20.    own .C file, to make their own separate .OBJ file.  If I were to
  21.    do this in PASCAL, implementing one function per .TPU, would there
  22.    be any performance lags _at run time_?
  23.  
  24. 2) considering the two following examples, which ones would run
  25.    faster, if we take into account that disk access is much slower
  26.    that any calculations done to find the indexing, thus the latter
  27.    can be ignored:
  28.  
  29. var datatfile : file;
  30.  
  31. (**** example one *****)
  32.  
  33.   reset(datafile, 1);
  34.   seek(datafile, random(100) * datasize);
  35.   blockread(datafile, data, datasize, bytesread);
  36.  
  37. (**** example two *****)
  38.  
  39.   reset(datafile, datasize);
  40.   seek(datafile, random(100));
  41.   blockread(datafile, data, 1, records_read);
  42.  
  43. All I want to know if there is a difference, in _disk access_
  44. between the two cases.  Thank you!
  45.  
  46. Steph.
  47.  
  48.