Re: [fpc-devel] PShortString

2010-09-10 Thread Sergei Gorelkin
Daniël Mantione пишет: 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 realiz

Re: [fpc-devel] PShortString

2010-09-09 Thread Florian Klaempfl
Am 10.09.2010 02:41, schrieb Hans-Peter Diettrich: > Florian Klaempfl schrieb: > >> 1. Ancient code, keep in mind, most code not being back end code was >> written ~10 years ago. At this time we even could not depend on >> perfectly working ansistrings. > > I'm talking about nowadays situation.

Re: [fpc-devel] PShortString

2010-09-09 Thread Daniël Mantione
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

Re: [fpc-devel] PShortString

2010-09-09 Thread Hans-Peter Diettrich
Florian Klaempfl schrieb: 1. Ancient code, keep in mind, most code not being back end code was written ~10 years ago. At this time we even could not depend on perfectly working ansistrings. I'm talking about nowadays situation. 2. Ansistring create an explicit exception frame etc. which slow

Re: [fpc-devel] PShortString

2010-09-09 Thread 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 PShortSt

Re: [fpc-devel] PShortString

2010-09-09 Thread Sergei Gorelkin
Hans-Peter Diettrich wrote: 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. When it is also known that 2

Re: [fpc-devel] PShortString

2010-09-09 Thread Florian Klaempfl
Am 09.09.2010 15:52, schrieb Hans-Peter Diettrich: > When dynamic strings are used all around, is the use of pointers to > ShortString still recommended? (fmodule contains a lot of them) 1. Ancient code, keep in mind, most code not being back end code was written ~10 years ago. At this time we eve

[fpc-devel] PShortString

2010-09-09 Thread Hans-Peter Diettrich
When dynamic strings are used all around, is the use of pointers to ShortString still recommended? (fmodule contains a lot of them) In many cases (almost all I found) the strings are duplicated when assigned, because the given dynamic strings disallow to simply copy the reference. IMO P[Shor