Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExecScript vs macro
Message
De
14/02/2002 17:22:25
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00620368
Message ID:
00620403
Vues:
14
thanks - I suspected as much ...

>>Hi,
>>
>>anyone have any performance metrics on 'execscript' vs '&' (macro sub) for code that can use either?
>>
>>Thanks!
>
>Macro substituion will be faster because execscript has to write the code to the disk, compile it and run.
>Here's a test
>lnMax = 1000
>lcCmd = "lnCount = lnCount + 1"
>
>lnStart = SECONDS()
>lnCount = 0
>FOR i = 1 TO lnMax
>	&lcCmd
>ENDFOR	
>? "Macro", SECONDS() - lnStart, lnMax, lnCount
>
>lnStart = SECONDS()
>lnCount = 0
>FOR i = 1 TO lnMax
>	EXECSCRIPT(lcCmd)
>ENDFOR	
>? "EXECSCRIPT", SECONDS() - lnStart, lnMax, lnCount
>
>Result:
>Macro - 0.01 sec
>Execscript - 16.8 sec
>
Ken B. Matson
GCom2 Solutions
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform