[fpc-devel] Re: dominant short strings in compiler source

L505 fpc505 at z505.com
Sat May 20 19:23:04 CEST 2006


> Also, using some compiler trickery can be done to optimize usage of
> AnsiStrings so we can avoid use of PChars, but of course this will
> have to wait a bit.

Or programmer trickery - the fpc souce already contains lots of programmer trickery around
ansistrings such as using uniquestring, setlength, and string[i] indexing instead of
concatenating with plus sign - but my case for LongString/WordString is that they are
stack based while ansistring is heap based no matter what.
And lots of people use stack based arrays of chars and arrays of bytes, so might as well
use a smart array of chars instead of a stupid one. The smart one is either a wordstring
or a longstring.




More information about the fpc-devel mailing list