[Home] [Puzzles & Projects] [Delphi Techniques] [Math topics] [Library] [Utilities]
|
|
Problem DescriptionHere is a program to the list creation and retrieval speed for standard TStringList the DFF integer equivalent, TIntList. Speed can be compared under multiple Delphi versions using the same source code. Background & TechniquesSome time ago, a fellow working on a Chess solver wrote asking about finding the position (rank) in a list of possible chess piece arrangements for 3 to 6 chess pieces. Additionally, given a rank, find the corresponding chess piece configuration. I don't believe that we ever really connected on the approach; he seemed to think that there was an algorithmic way to generate these values but it seemed to me that building enumerated lists of valid positions would be required. In any event, the question led to thus investigation of relative building and retrieval speeds for large stringlists and whether the DFF integer lists would be faster. They are. This program runs timing tests for two list types: the standard
TStringlist Delphi type and DFF TIntList type which has most
TStringList methods but with 64 bit integer keys. When the program is compiled under Delphi XE, string lists are built 2 or 3 times faster than in Delphi 7. Integer lists have exactly the same code under XE are built at about the same speed as under D7 and are therefore "only" about 10 times faster than string lists. Random retrievals of string list records in XE are also several times faster than string list records under Delphi 7. From the programmer's perspective, there are several point worth mentioning:
. Running/Exploring the Program
Suggestions for Further Explorations
|
[Feedback] [Newsletters (subscribe/view)] [About me]Copyright © 2000-2018, Gary Darby All rights reserved. |