Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Side by side comparison (strings & local data)
Message
De
23/12/2003 14:54:02
 
 
À
23/12/2003 14:16:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00861648
Message ID:
00861721
Vues:
35
Hi Jos,

i think Garret have swap the optimization:
CLEAR

tt = SECONDS()
xString = REPLICATE("a",100000)
? "direct fill",SECONDS()-tt

xString = ""
tt = SECONDS()
FOR i=1 TO 100000
  xString  = m.xString  +"a"
NEXT
? "compiler see string = string + ...., then enlarge the heap",SECONDS()-tt

xString = ""
tt = SECONDS()
FOR i=1 TO 100000
  xString  = "" + m.xString  +"a"
NEXT
? "compiler copy the string",SECONDS()-tt


xString = ""
tt = SECONDS()
FOR i=1 TO 100000
  STORE m.xString  +"a" TO xString
NEXT
? "compiler use a intermediate ?? optimization ",SECONDS()-tt
Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform