Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by clause in vfp8
Message
From
23/04/2003 03:39:41
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00774269
Message ID:
00780495
Views:
43
George,

>>>My example (the FOR...NEXT loop) does exactly the same thing: Calls functions multiple times. That's where the additional overhead comes in.
>>
>>But in your example the statment is both interpretated and called for each loop, while in a SQL statement it is only interpretated onces and called for each selected record. This is were the difference is. IOW your example does not reflect the same situation. It might have been another issue if you used a REPLACE ALL of CALCULATE MAX() command to illustrate.



>The statement is interpreted once and called multiple times in a FOR...NEXT iteration structure. There's no question about it.

You might want to check this again, because it is not true. VFP operates on P-code. That means that for every instruction the P-code has to be executed in the P-code interpretor. whether the VFP can optimize things in a FOR NEXT loop, I simply don't know, but it surely is interpretated for each command line to set some internal variables and handle some windows messages depending on some settings, debugger stuff, and of course to executed the C/C++ implementation of the command.

If you don't believe me, just check some books about interpretating or ask the VFP team....

Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform