delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/05/02:58:54

Date: Thu, 5 Jun 1997 14:48:55 +0800 (GMT)
From: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
To: Conrad Wei-Li Song <conradsong AT mail DOT utexas DOT edu>
cc: Timothy Robb <trobb AT neutrino DOT phys DOT laurentian DOT ca>, djgpp AT delorie DOT com
Subject: Re: LinkedLists
In-Reply-To: <199706050619.CAA13562@delorie.com>
Message-ID: <Pine.SGI.3.93.970605144510.9061A-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

> >I've given up on Quick Sorting my list because I will be adding one item
> >at a time to it and the add function will call the sort function, as a
> >result Insertion Sort would probably be the best method.
> >
> Listen.  If you're not going to be calling a lot of inserts or deletes in
> the middle of the list consider implementing the list as a self-adjusting
> array-- that is, when you run out of room in your array, you double its
[..]

Forgive me if I'm wrong, but I think the best implementation overall is a
dynamically-allocated binary tree. Did anyone mention that? you can even
get a complete, functional system (source code), easily adaptable to your
own needs, in the C Bible (a.k.a. Kernighan and Ritchie). That's what I
did for some UNIX accounting stuff that had previously been done with awk
(the data files were about 30MB in size) and the processing time was
reduced from 2+ days to 45 minutes. All standard ANSI C.

-----------------------------------------------------------------------
Orlando Alcantara Andico
WWW:   http://www2.mozcom.com/~orly/           Email:   orly AT mozcom DOT com
ICBM:  14 deg. 30' N, 120 deg. 59' E           POTS:    (+632) 932-2385

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019