🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #327

Re: Sorting - Big files

#327
From: Marcus Morris
Date: Fri, 23 Apr 1999 00:00
21 lines
1694 bytes
In article <3718310F.1DB0@csolve.net>, Mike Monett <add@csolve.net>
writes

>  The next problem is the number of file handles. This might be a good
>  argument for not using the heap, which limits you to 64k chunks.

Michael - you can do it with four file handles. There is a method called
the "Merging Sort" which uses only four files. This method used to be
used for sorting records held on tape (for which you needed four tape
units) but you can do it with four serial files on one disk. Neither
file size nor memory size is a problem - never more than three records
in memory at any one time.

The method is described in "Elements of Computer Science", 2nd Ed., Glyn
Emery, Pitman, 0-273-01332-7 (ch8 p136 in my copy).

If you can't find the reference, get back to me and I'll try to post you
the method.

-- 
Marcus Morris - South Croydon, LONDON, UK (Marcus@ntos.demon.co.uk)
Technical Details
Message-ID: <+dSjqKAGF$H3EwKA@ntos.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7f4grb$7ik$1@nnrp1.dejanews.com> <7f53jk$nt8$1@nnrp1.dejanews.com> <3718310F.1DB0@csolve.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111659,e7de494902ed891c
X-Google-Attributes: gid111659,public
X-Google-Thread: 108ebd,e7de494902ed891c
X-Google-Attributes: gid108ebd,public
From: Marcus Morris <Marcus@ntos.demon.co.uk>
Subject: Re: Sorting - Big files
Date: 1999/04/23
Message-ID: <+dSjqKAGF$H3EwKA@ntos.demon.co.uk>
X-Deja-AN: 469841102
Distribution: world
X-NNTP-Posting-Host: ntos.demon.co.uk:158.152.27.7
References: <7f4grb$7ik$1@nnrp1.dejanews.com> <7f53jk$nt8$1@nnrp1.dejanews.com> <3718310F.1DB0@csolve.net>
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 924840532 nnrp-08:22197 NO-IDENT ntos.demon.co.uk:158.152.27.7
Organization: NTOS Systems
MIME-Version: 1.0
Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal