KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a choice. I have a number of already ordered strings that I need to store and access. It looks like I can choose between using: A TStringList A Dynamic Array of strings, and A Linked List of strings (singly linked) and Alan in his comment suggested I also add to the choices: TList<string> In what circumstances is each of these better than the others? Which is best for small lists (under 10 items)? Which is best for large lists (over 1000 items)? Which is best for huge lists (over 1,000,000 items)? Which is best to minimize memory use? Which is best to minimize loading time to add extra items on the end? Which is best to minimize access time for accessing the entire list from first to last? On this basis (or any others), which data structure would be preferable? For reference, I am using Delphi 2009. Dimitry in a comment said: Describe your task and data access pattern, then it will be possible to give you an exact answer Okay. I've got a genealogy program with lots of data. For each person I have a number of events and attributes. I am storing them as short text strings but there are many of them for each person, ranging from 0 to a few hundred. And I've got thousands of people. I don't need random access to them. I only need them associated as a number of strings in a known order attached to each person. This is my case of thousands of "small lists". They take time to load and use memory, and take time to access if I need them all (e.g. to export the entire generated report). Then I have a few larger lists, e.g. all the names of the sections of my "virtual" treeview, which can have hundreds of thousands of names. Again I only need a list that I can access by index. These are stored separately fro
Tags (comma-separated)
Save Edits
Cancel