Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF vs. IF
Message
De
28/06/2002 11:31:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00673310
Message ID:
00673320
Vues:
18
>>I often replace IF with IIF. I don't think the time difference will be >significant, but I do suggest, as a general norm, to reduce redundant code. >I am fairly sure the compiler will not optimize this.
>
>Every ns counts! :) Granted it would take E9 redundant iif's in my example to be a second...

Program readability counts, too. You must decide whether it is worth the trouble to code around this.

OTOH, the redundant assignment may be partly offset (?) or more than offset (?) by the fact that IIF() is faster than IF.

Speed tests are warranted, but I will leave for you, as "homework".

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform