Am 28.02.2012 10:10, schrieb Sven Barth:
Am 28.02.2012 09:07, schrieb Martin Schreiber:
Am 28.02.2012 09:46, schrieb Sven Barth:
You are right, I checked the code of SetLength for arrays and strings
and only arrays use FillChar. Nevertheless there is no other operation
you can use for arrays.
Same in Delphi?
I can't tell whether Delphi also uses FillChar (because I won't look at
the source of Delphi's RTL), but there is also no other operation.
So using TBytes instead of FPC 2.6 AnsiString as buffer has a
performance penalty.
It has a convenience penalty too because TBytes can not be concatenated
by "+". Using operator overloading is maybe not Delphi compatible and
probably has less performance than the optimized concat*() string
compiler procs. There AFAIK also is no convenient way to concatenate
TBytes with string constants and variables.
Martin
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel