Alberto Paderno wrote:
 for i as integer = 1 to kReps
   dim s as string = "something"
   s = s + " "
   s = s + "else"
 next

That is a bad coding, as you keep to create the same string at every
execution of the loop; then your create temporary strings two times.
A better code would be:

Dim S As String = "something"
Dim T As New String
For I As Integer = 1 to kReps
  T = S + " " + "else"
Next

I know the code is simply an example, but it is very inefficient.to

Try...

Dim i as integer
Dim s() as string

for i = 0 to 10000

  s.append("something")

next

s = join(s, "")

Using join with a string array is an infinitely faster way
to concatenate strings in RB.


_______________________________________________
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>

Reply via email to