Groups | Search | Server Info | Login | Register
Groups > comp.lang.pascal.borland > #117
| From | Marco van de Voort <marcov@toad.stack.nl> |
|---|---|
| Newsgroups | comp.lang.pascal.borland |
| Subject | Re: Memory, objects, and TCollections |
| Date | 2012-07-27 10:46 +0000 |
| Organization | Stack Usenet News Service |
| Message-ID | <slrnk14sce.1hrj.marcov@toad.stack.nl> (permalink) |
| References | (1 earlier) <slrnk0oqt8.1kcg.marcov@toad.stack.nl> <a73kb8FbdcU1@mid.individual.net> <26f0e9a9-0108-478f-9319-f1a88a773a51@d32g2000yqn.googlegroups.com> <slrnk0tir2.13v1.marcov@toad.stack.nl> <91488169-ce22-42cd-b947-61ff29427407@googlegroups.com> |
On 2012-07-26, Jim Leonard <MobyGamer@gmail.com> wrote: > This project must run on 808x systems, so no. Dataintensive apps with those limitations, that is setting yourself up for disaster, but let's take it as a given. One of the problems then is that the hardwiring of ems/xms support, while 8086 compatible also adds limitations. You can't rely on it too much and essentially use mainmem as a paging buffer, because what if it is missing or very limited in size like on XTs and older 286s? >> Inserting an item in larger collections becomes very slow because >> it has to move (on average) n/2 items. > > Right, but it's only moving a 4-byte pointer so it's not that bad. I have the RTL and I peeked at the implementation -- it's just an array of pointers. That should have been on /ordered/ collections. If you load unsorted data and insert them into a TP TSorted* or Delphi TStringlist, since the average item will insert in the middle of the list, there are sizeof(pointer)* (N/2) bytes to move to make room for them. So for N items that becomes a sizeof(pointer)*N^2/2 iow O(N^2) operation. But as said typically you only start to notice it at hundreds of thousands of items, and afaik standard TP datatypes are limited to 64k, so 16384 items max.
Back to comp.lang.pascal.borland | Previous | Next — Previous in thread | Next in thread | Find similar
Memory, objects, and TCollections Jim Leonard <mobygamer@gmail.com> - 2012-07-22 11:02 -0700
Re: Memory, objects, and TCollections Marco van de Voort <marcov@toad.stack.nl> - 2012-07-22 21:07 +0000
Re: Memory, objects, and TCollections Robert AH Prins <spamtrap@prino.org> - 2012-07-23 02:31 +0000
Re: Memory, objects, and TCollections Jim Leonard <mobygamer@gmail.com> - 2012-07-23 11:33 -0700
Re: Memory, objects, and TCollections Marco van de Voort <marcov@toad.stack.nl> - 2012-07-24 16:20 +0000
Re: Memory, objects, and TCollections Jim Leonard <MobyGamer@gmail.com> - 2012-07-26 14:19 -0700
Re: Memory, objects, and TCollections Marco van de Voort <marcov@toad.stack.nl> - 2012-07-27 10:46 +0000
Re: Memory, objects, and TCollections Jim Leonard <mobygamer@gmail.com> - 2012-07-23 11:42 -0700
Re: Memory, objects, and TCollections Marco van de Voort <marcov@toad.stack.nl> - 2012-07-25 12:10 +0000
Re: Memory, objects, and TCollections Jim Leonard <MobyGamer@gmail.com> - 2012-07-26 14:21 -0700
Re: Memory, objects, and TCollections Marco van de Voort <marcov@toad.stack.nl> - 2012-07-27 11:13 +0000
csiph-web