You are not logged in.
I have a class that contains an array where I need to find a certain object in this array as I want to update this certain object.
I've tried to find examples of how to do this but still failed so my hope is that someone could have such an example to show how this could be done.
Thanks in advance!
Delphi-11, WIN10
Offline
Ok, I've done that already but as the array can contain several hundreds of object in the worst case I thought that using a dynamic array could be more effective.
In this case, load and response time is not an issue but I like to be more effective and I can think of cases where this could be an issue.
And why not to be prepared?
Delphi-11, WIN10
Offline
Searching in thousands of objects in memory if fast.
There is nothing else than a loop to do this.
The only fastest way may be to use an index, e.g. a hash table, but it would need more than a dynamic array.
You can do this with TDynArrayHasher if really needed in the future. But the data will remain in the dynamic array anyway.
Offline