[fpc-devel] Performance of string handling in trunk

Hans-Peter Diettrich DrDiettrich1 at aol.com
Fri Jun 21 18:29:33 CEST 2013


Michael Schnell schrieb:
> On 06/21/2013 02:20 PM, Hans-Peter Diettrich wrote:
>>
>> Please note that I was *not* talking about AnsiStrings.
> 
> Sorry I don't understand.

You snipped the context, which was UnicodeString (second case). The 
AnsiString case was covered before.

> I recon the OP asking about a performance hit, meant a degradation 
> regarding the "new" (Delphi XE compatible") vs  the "old" (Delphi 7 
> compatible) String library.

Right, and there seem to be more issues with the current implementation. 
E.g. I don't understand the many tests in the RawByteString 
concatenation, and others found excess try-finally blocks and 
UniqueString calls.

Another reason may be the (old?) TStringList in the test program, 
possibly using AnsiStrings, which will cause overhead when used with 
UnicodeStrings. I didn't do own researches yet, my statements are based 
on general considerations and a perfect implementation.

DoDi




More information about the fpc-devel mailing list