[fpc-pascal] FPC now 3rd in shootout
Daniël Mantione
daniel.mantione at freepascal.org
Tue Nov 6 15:52:50 CET 2007
Op Tue, 6 Nov 2007, schreef L:
> The funny thing I see is everyone recommending Pchars. Why not
> setlength/uniquestring? Still too slow?
Memory management, especially when you get reallocations, is expensive. =
With case ansistrings can perform well. However, you do have to care, and =
Pchars can always be faster.
> Several years/months ago, when I posted
> something on the mailing lists about how trying to defeat the compiler wi=
th
> reference counting basically leads to more work than just taking matters =
into
> your own hands with pchars.. it led to some heated arguments. For example
> some said that the compiler didn't need to use pchars and it was fast.. h=
mm
> I wonder if maybe there are some reference counting slowdowns in the =
> compiler that slow it down a bit. Although I realize it uses shortstrings
> for a lot of stuff.
The compiler uses shortstrings internally, which are the fastest string =
type. Pchars are between ansistrings and strings, but offer the least =
comfort of all.
Dani=EBl
More information about the fpc-pascal
mailing list