On Dec 08, 2006, at 4:40 PM, Charles Yeomans wrote:
On Dec 8, 2006, at 6:23 PM, Kem Tekinay wrote:
On 12/8/06 6:13 PM, Charles Yeomans at [EMAIL PROTECTED] wrote:
Okay. Were you intending this to be a counterexample to my claim?
Well, I don’t think I would have phrased it that way, but I guess
so. :-)
What your example shows is that Join is probably not faster than
string concatenation for a small number of strings. I'm not too
surprised by this. Compare these two methods and see which is faster.
dim s as String
for i as Integer = 1 to 10000
s = s + "a"
next
dim buffer(-1) as String
for i as Integer = 1 to 10000
buffer.Append "a"
next
dim s as String = Join(buffer, "")
Has anyone tried using a memoryblock as a mutable string instead of
immutable string concatenation ?
Or Charles StringBuffer which I think could avoid some of the
overhead of constantly creating new immutable strings (I culd be wrong)
Just thinking that there has to be a really decent explanation for
why such apparently straight forward code appears to not perform as
well as expected_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>