[fpc-pascal] Speed question for strings

L505 fpc505 at z505.com
Sat Nov 19 09:46:31 CET 2005

> L wrote:
> > Why is the first and third example *so* much faster than the second example?
> > Significantly faster.
> >
> Because you doubled the number of string concatenations.
> Vincent.

Right, but it's not twice as slow :-) Worse... It's at least 50-100 times slower.

I will have to do some bench marks. I just thought that if there was already a string
concatenation happening, that an additional concatenation would cost me twice as much
time, but not 50-100 times. Plus, the second concatenation is a small concatenation.
It's only two characters in length (#13#10) whereas the Line is much bigger.


More information about the fpc-pascal mailing list