On Dec 8, 2006, at 6:56 PM, Norman Palardy wrote:
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)
Join is a lot faster than my code. The problem here is not
concatentation of a large sequence of strings; the problem is many
concatenations of small sequences.
Charles Yeomans_______________________________________________
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>