home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!gatech!taco!csemail.cropsci.ncsu.edu!samodena
- From: samodena@csemail.cropsci.ncsu.edu (S. A. Modena)
- Subject: Re: LARGE Sorts and such...
- Message-ID: <1993Jan4.204921.3217@ncsu.edu>
- Sender: news@ncsu.edu (USENET News System)
- Organization: Crop Science Dept., NCSU, Raleigh, NC 27695-7620
- References: <1993Jan3.222248.18162@news.acns.nwu.edu>
- Date: Mon, 4 Jan 1993 20:49:21 GMT
- Lines: 59
-
- In article <1993Jan3.222248.18162@news.acns.nwu.edu> delusion@casbah.acns.nwu.edu (Albert Schmezer) writes:
- > Hello all, again. I am in the midst of a large programming project,
- >and have come across an interesting stumbling block. I hope this isn't a FAQ.
- >If it is, could someone direct me to the source of the answer?
- >
- > Anyways, for the question: How does one go about, in TurboPascal,
- >sorting an array of IMMENSE proportions? What I mean is that I am making a
- >database-type program, and I have at least 10,000 items in the database. How
- ......
- >temporary file on the harddrive? How slow is this? How would I even go about
- >doing this? Can I stick groups of 100 or so into an array and integrate the
- >sorts? How would I do this?! Is this slow, too?
- >
- >
- > Thanx in advance!
- ><<delusion
- >
-
- You are on the right track in your thinking.
-
- Generally speaking (and remembering back to just ten years ago on the
- first micro I ever programmed on), a *good* sort utility takes a look
- at the file (data) to-be-sorted and uses some heurustics to guess-timate
- whether the data can be sorted in memory or must be sorted on-disk.
- If, on-disk, then it does a calculation to guess-timate whether the data
- is small enough for an efficient single pass...or should be broken into
- a series of small files to be sorted individually FOLLOWED by a MERGE
- of the sorted files.
-
- Only *you* can make these design decisions, because only *you* know
- whether you are programming for the PARTICULAR computer you are working
- on OR if this program must ANTICIPATE everything from a dog-tired
- IBM PC with 256K and dual floppies (I have one right behind me) and
- all the way up to what I'm programming on right now (33 MHz 486DX
- with 20 Megs RAM and two 12 milliSec hard drives totalling >300 MBs).
-
- This decision and design process is the essence of software development,
- as opposed to "coding." :^) So you might come back with specific
- questions if you get stumped once you'vew decided what the design
- parameters are going to be. Good luck!
-
- Steve
- ---
- +------------------------------------------------------------------+
- | In person: Steve Modena AB4EL |
- | On phone: (919) 515-5328 |
- | At e-mail: nmodena@unity.ncsu.edu |
- | samodena@csemail.cropsci.ncsu.edu |
- | [ either email address is read each day ] |
- | By snail: Crop Sci Dept, Box 7620, NCSU, Raleigh, NC 27695 |
- +------------------------------------------------------------------+
- Lighten UP! It's just a computer doing that to you. (c)
- OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
-
-
-
-
-
-
-