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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only