Perhaps not everyone understands that it is by measuring the length of the
string, reduces the speed of execution.
Suppose that it is work with a
string without measuring its length.
Code: Select all
DisableDebugger
Time = ElapsedMilliseconds()
For i=1 To 100000
Next i
MessageRequester("", StrF((ElapsedMilliseconds()-Time)/1000, 3))
This length measurement (assume that every time a
string is added to 10 characters).
Code: Select all
DisableDebugger
Time = ElapsedMilliseconds()
Len = 10
For i=1 To 100000
For y=1 To Len : Next y ; Analog of function Len().
Len + 10
Next i
MessageRequester("", StrF((ElapsedMilliseconds()-Time)/1000, 3))
Compare speed of execution.