[fpc-devel] Performance of string handling in trunk

Michael Schnell mschnell at lumino.de
Thu Jun 27 14:29:10 CEST 2013


On 06/27/2013 01:48 PM, Marco van de Voort wrote:
>
>> when storing a - say UTF-8 - String in a
>> stringlist and retrieving it later to a String variable with encoding
>> type UTF-8 a dual conversion is done.
> Yes.
>   
>> To me this seems absolutely silly.
> Correct. Using UTF8 on Windows is silly, as it is not a native string type,
> and is never used by default.
>
Yep. But fpc is not windows-centric, thus i´rt should not force the user 
to n encoding that is suggested by Windows. And (at least the 
definitions in "interface" of) TStringList should be not OS or 
arch-depending. Thus using a String type that imposes a fixed encoding 
or (even worse) that might change according to the Arch/OS setting when 
compiling is a rather bad idea.

As imposing a dual unnecessary conversion or forcing the user to use a 
certain encoding when working with TStringList is a bad idea as well.

This IMHO we do need an appropriately versatile String type and (a 
decently fast) implementation.

-Michael



More information about the fpc-devel mailing list