Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip: when sum long strings it is best to group them
Message
De
15/05/2005 12:48:28
 
 
À
15/05/2005 09:44:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01014343
Message ID:
01014355
Vues:
22
Hi Fabio,

if you know you are handling sizable strings, you could always reach back into the old tricks:
t1=SECONDS()
FOR K=1 TO 10
	 lnX = STRTOFILE(m.x, "NUL")+ ;
	 	STRTOFILE(m.x, "NUL")+ ;
	 	STRTOFILE(m.x, "NUL")+ ;
	 	STRTOFILE(m.x, "NUL")+ ;
	 	STRTOFILE(m.x, "NUL")+ ;
	 	STRTOFILE(m.x, "NUL")+ ;
	 	STRTOFILE(m.x, "NUL")+ ;
	 	STRTOFILE(m.x, "NUL")
NEXT
? lnX, "StrToFile >> Nul",SECONDS()-t1

t1=SECONDS()
FOR K=1 TO 10
	 lnX =LEN(m.x) + LEN(m.x)+ ;
		LEN(m.x) + LEN(m.x)+ ;
		LEN(m.x) + LEN(m.x)+ ;
		LEN(m.x) + LEN(m.x)
NEXT
? lnX, "Len() summed",SECONDS()-t1
gives on a few of my machines very competitive and suprisingly similar resutls if added into your test program.

regards

thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform