Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Argument starter - The roots of all evil
Message
De
09/09/2004 11:23:43
Walter Meester
HoogkarspelPays-Bas
 
 
À
09/09/2004 08:27:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00938079
Message ID:
00940670
Vues:
31
Tamar,

>> Even though Tamar has indicated that there's an order of magnitutde difference between using a FOR...ENDFOR construct over a DO WHILE, I don't necessarily believe that it would apply in all cases. While her remarks were directed towards VFP 7.0 and above, in VFP 6.0 it took in excess of 10,000,000 iterations before more than 1/10th of a second was realized. <
>
>FYI, just ran my test code in VFP 6 SP5. Results:
>
>DO WHILE: 14.5370
>FOR: 1.2250
>
>Again, this 10,000 iterations of a loop from 1 to 1,000. So, 10000*1000 = 10,000,000 iterations.


Indeed for an empty loop, but as soon as you are going to anything with it and place a condition into the FOR loop with an EXIT, the difference is far less convincing.

Walter,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform