TStringList, Dynamic Array or Linked List in Delphi?

Posted by lkessler on Stack Overflow See other posts from Stack Overflow or by lkessler
Published on 2010-04-21T05:51:09Z Indexed on 2010/04/21 5:53 UTC
Read the original article Hit count: 311

I have a choice.

I have an array of ordered strings that I need to store and access. It looks like I can choose between using:

  1. A TStringList
  2. A Dynamic Array of strings, and
  3. A Linked List of strings

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 tor minimize memory use?

Which is best to minimize loading and/or access time?

For reference, I am using Delphi 2009.

© Stack Overflow or respective owner

Related posts about delphi

Related posts about tstringlist