Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic C# question
Message
From
06/07/2006 11:48:02
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01133939
Message ID:
01134184
Views:
20
Hi,

I understand what you're saying (sort of) but the JIT compiler only looks at the IL code. So if you use the .Count value as the for expression (and AFAICS the IL code indicates this should be evaluated for each iteration) you suggest the JITC may or may not decide to do this. OTOH if you know the .Count value is *not* going to change then assigning this to a variable and using that as the for expression should *guarantee* optimised code?

Regards,
Viv

>The IL is not a great indication of how and what the JIT method thunks end up looking like as native code. In Alex's case it is best to let the JIT compiler make the decision on hoisting.
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform