Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic C# question
Message
From
06/07/2006 10:02:08
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01133939
Message ID:
01134132
Views:
28
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform