Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP versus C++
Message
De
19/11/2003 13:31:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00842594
Message ID:
00851561
Vues:
19
Hi Christof,

VFP OCCURS() is not a C++ routine very well implemented.

ALINES() is 80% faster

Then, paradoxicalally, it is more convenient to execute ALINES() and then RELEASE the created Array.
sString = ''
FOR k=1 TO 10000
sString = m.sString +','+REPLICATE('a',RAND()*1000)
NEXT
? LEN(m.sString)
t1=SECONDS()
FOR k=1 TO 10
  =OCCURS(",",m.sString)
NEXT
? SECONDS()-t1 && 2444 ms
t1=SECONDS()
FOR k=1 TO 10
  =ALINES(aoccurs,m.sString,",")
NEXT
? SECONDS()-t1 && 1342 ms
Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform