Michael Vogel wrote:The speed differences are amazing, but preparing the dish (moving strings to an array etc.) and removing the rest (free memory) will cost also some time, I fear...
How much time could be saved for replacing code lines like...
Code :
a.s="this is a very short string"
b.s=#CRLF$
c.s="and one more short string"
... and now one million times:
s.s=a+b+c
by something like
Code :
s=StringConcat(a,b,c)

19 sec vs 0.032 sec =~ 600 times slower for native string concatenation.

You can play with the example I posted. Obviously, it is more critical for large string buffers.
S.S = a + b + c is the only buffer that is growing, so it's the only one that needs handling.
Michael Vogel wrote:I fear, when working with standard strings, no (big) improvement will be possible, like with other string handling functions (StringFind, StringFindRight, StringMid, StringLeft, StringRight, StringCut, StringReplace etc.)
Each of the StringFns() can and have been adapted to a memory approach for working on large buffers.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum