JuhaManninen, thanks for THashedStringList hint, just checked implementation, will go with this class.
Marcov, it should not break any Delphi compatibility, if function runs faster it's about optimization, not compatibility. So less arrogance please.
Jc99, thanks for code. Anyway, instead having this already in THashedStringList it can also be improved in TStringList.
If items are sorted, why not use it? Just 5 lines of code optimizations.