Op Fri, 10 Sep 2010, schreef Hans-Peter Diettrich:
Sergei Gorelkin schrieb:
When dynamic strings are used all around, is the use of pointers to
ShortString still recommended? (fmodule contains a lot of them)
Whenever you care about performance, you'll quickly realize that dynamic
strings are plain inappropriate.
The concrete use of PShortString strings is inappropriate in your sense,
because it results in allocation, copy and deallocation of temporary strings
in the code, in many places. This behaviour gave birth to my question.
Ansistrings result allocation copy and deallocation during *processing*.
The use of ansistrings would make the compiler at least twice as slow and
quadruple its memory consumption.
Daniël
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel