home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!utcsri!newsflash.concordia.ca!sifon!thunder.mcrcim.mcgill.edu!poly-vlsi!music.mus.polymtl.ca
- From: Steph <CT80@music.mus.polymtl.ca>
- Subject: Performance questions
- Message-ID: <07JAN93.21000832.0034@music.mus.polymtl.ca>
- Lines: 37
- Sender: usenet@music.mus.polymtl.ca
- Organization: Ecole Polytechnique de Montreal
- Date: Fri, 8 Jan 1993 00:26:42 GMT
-
- First off I would like to thank all of you (there was a lot!) that
- took the time to reply on the "User-Interface Language" question.
- There were a lot of different ideas, and I have yet to choose one.
- If you guys want it, I can post a summary of them all on this sub.
-
- Anyway, I have two more questions for you out there. Boy, I never
- stop, eh?
-
- 1) I have seen often in 'C programs big functions separated in their
- own .C file, to make their own separate .OBJ file. If I were to
- do this in PASCAL, implementing one function per .TPU, would there
- be any performance lags _at run time_?
-
- 2) considering the two following examples, which ones would run
- faster, if we take into account that disk access is much slower
- that any calculations done to find the indexing, thus the latter
- can be ignored:
-
- var datatfile : file;
-
- (**** example one *****)
-
- reset(datafile, 1);
- seek(datafile, random(100) * datasize);
- blockread(datafile, data, datasize, bytesread);
-
- (**** example two *****)
-
- reset(datafile, datasize);
- seek(datafile, random(100));
- blockread(datafile, data, 1, records_read);
-
- All I want to know if there is a difference, in _disk access_
- between the two cases. Thank you!
-
- Steph.
-
-