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 09:44:40
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Tip: when sum long strings it is best to group them
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01014343
Message ID:
01014343
Vues:
61
The VFP inefficient VM engine open a trick door:
clear
FOR K=1 TO 10000000
NEXT

X=SPACE(2000000)

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

t1=SECONDS()
FOR K=1 TO 10
	 =LEN(REPLICATE(m.x,8))	&& MINIMUM EXPECTED TIME
NEXT
? "MINIMUM TIME",SECONDS()-t1

t1=SECONDS()
FOR K=1 TO 10
	 =LEN(m.x+m.x+m.x+m.x+m.x+m.x+m.x+m.x)
NEXT
? "LINEAR CONCAT",SECONDS()-t1

t1=SECONDS()
FOR K=1 TO 10
	 =LEN((m.x+m.x+m.x+m.x)+(m.x+m.x+m.x+m.x))
NEXT
? "grouping THE CONCAT",SECONDS()-t1

t1=SECONDS()
FOR K=1 TO 10
	 =LEN(((m.x+m.x)+(m.x+m.x))+((m.x+m.x)+(m.x+m.x)))
NEXT
? "full grouping THE CONCAT",SECONDS()-t1,"THIS IS (MINIMUM TIME)*LOG2(NUMSUM)=0.586*3"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform