Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is ASSERT used for?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00141677
Message ID:
00142988
Vues:
40
>Set Assert off
>
>nStart = Seconds()
>For t=1 to 100000
> Assert .T.
>Endfor
>? Seconds() - nStart
>
>nStart = Seconds()
>For t=1 to 100000
>Endfor
>? Seconds() - nStart
>
>The loop with Assert takes between 40% and 50% longer than the loop without any command in there.

Of course, this doesn't say anything about code that uses ASSERTs, just that the ASSERT command itself takes time, even without ASSERTs ON. That's an important finding, but it shouldn't affect our coding practices (and I'm sure you agree).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform