Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Issue: string concatenation
Message
From
15/05/2005 09:31:59
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Issue: string concatenation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01014342
Message ID:
01014342
Views:
59
The manipulation of the VFP' STRINGS is not much efficient one,
but the following code show a TOO MUCH inefficient execution.
clear
FOR K=1 TO 10000000
NEXT

y=SPACE(0)
X=SPACE(16000000)

t1=SECONDS()
FOR K=1 TO 100
	 =LEN(m.x)
NEXT
? "read result only",SECONDS()-t1

t1=SECONDS()
FOR K=1 TO 100
	 =LEN(m.x+m.y)
NEXT
? "long+short is ok",SECONDS()-t1,"this read the long string, good !"

t1=SECONDS()
FOR K=1 TO 100
	 =LEN(m.y+M.X)
NEXT
? "short+long IS BAD",SECONDS()-t1,"this read AND WRITE the long string,badly, much evil "
Next
Reply
Map
View

Click here to load this message in the networking platform