Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN vs DO WHILE: Which is faster?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00230167
Message ID:
00230794
Views:
27
>From my experience, SCAN is faster than DO WHILE. I don't remember a case when DO WHILE was faster, but, it's also true that I rarely did such tests. :)

I had a SCAN a 'while' < g > ago that was actually noticeably slower, so I changed it to WHILE. But it was a case where SCAN was being used poorly - in the loop, several other tables were selected, SQL was run, the rec pointer was moved and re-set so the SCAN would work, etc. Everything possible to ruin the SCAN's advantage was being done, basically, and it succeeded :)
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform