[fpc-devel] TList or TFPList - a Linked list ?
Micha Nelissen
micha at neli.hopto.org
Wed Dec 14 22:50:38 CET 2005
On Wed, 14 Dec 2005 22:40:40 +0100
Micha Nelissen <micha at neli.hopto.org> wrote:
> increased by 8 items. So when adding 1000 (to take a number) items, the list
> is copied at least 10, possibly 13 times, 12 -> 28 -> 44 -> 60 -> 76 -> 92
> -> 108 -> 124 -> 140 -> 206 -> 325 -> ~500 -> ~780 -> ~1000. For the linked
> list case, no memory is copied.
Hmm, in case one doesn't know the number of items in advance, it would be
nice to have a AssignTo/CopyTo(AList: TList) method that copies to items
into a regular list, so it can be sorted or whatever random access you may
need.
Micha
More information about the fpc-devel
mailing list