Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Basic C# question
Message
De
06/07/2006 10:02:08
 
 
À
06/07/2006 04:31:26
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01133939
Message ID:
01134132
Vues:
29
>Alex,
>
>It is recommended that you leave the count in the body of the loop as the JIT compiler looks for this pattern and knows how to optimize it (hoisting).
>
>for (int i = 0; i < this.TreeView1.Nodes.Count; i++)
>{
>}
>
>If you perform the hoisting yourself you remove this ability away from the optimising compiler.
>
>Regards
>Neil


Hoisting, eh? It seems you have a point:
http://codebetter.com/blogs/gregyoung/archive/2006/06/12/146372.aspx


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform