Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExecScript vs macro
Message
From
14/02/2002 17:22:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00620368
Message ID:
00620403
Views:
13
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
Previous
Reply
Map
View

Click here to load this message in the networking platform