Versions des environnements
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.
>
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement