Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do the Mdots have it?- Attn Ken Levy
Message
From
26/04/2002 12:56:28
 
 
To
25/04/2002 22:15:50
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00649450
Message ID:
00649691
Views:
22
>Ken
>
>Reputable people report that use of m. nomenclature on the right side of variable assignment is far faster in VFP7 than m.-less syntax.
>
>I.e.
>
>
>myvar=m.lcMyOtherVar
>
>
>is much faster than
>
>
>myvar=lcMyOtherVar
>
>
>The difference is not that using m. is now faster; the difference is that NOT using m. is much slower than it used to be with VFP6.
>
>Those of us who deliberately changed to hungarian notation seem to be disadvantaged.
>
>Why has this happened? Is there a new feature/benefit that causes this as a side effect?
>
>Regards
>
>JR

I tested Cetin's code, and there is indeed a difference from VFP6 to VFP7.

The specifics of his example show the behavior at its most pronounced. Using his example, on my PC (PIII 933) the slowdown is ~.0000011 seconds per variable per iteration.

I found that the slowdown is proportional to the number of fields in the table opened in the currently selected workarea. Since his code uses 255 fields, it represents the worst case; halving that number will roughly half the amount of the increase, and so forth down to 1 field. With 1 field, or no table open in the currently selected workarea, there is basically no slowdown, or it is negligible.

To put this in perspective, on my machine you would have to reference variables around 909000 times, with the currently selected workarea containing 255 fields, to add one second to execution time. His example references 3 variables 5,000,000 times. Depending upon your application, hardware, etc., you may or may not perceive a noticable slowdown.

I have entered this as a bug. At this point, I don't have an explanation for why this changed between VFP6 and VFP7.
Jim Saunders
Microsoft
This posting is provided “AS IS”, with no warranties, and confers no rights.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform