Fastream Technologies wrote:
> Hello,
> I have fixed the function as below (providing for the sake of
> completeness): 

You are re-inventing the wheel. Simply set property TStringList.Sorted to True
and a Add() or AddObject() uses binary search to Insert data at the right index.

As I mentioned recently, for a cache that frequently gets new entries this is
not the right data structure since Inserts are too slow. A binary search tree
performs better, have a look at the my demo and note the faster Insert speed 
of TAvlObjectTree:

Arno Garrels

To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to