In the tutorials for Memory Management, there is an section Memory Allocation Cost regarding optimizing locals, particularly, in a for loop.
This contradicts what i had been lead to believe in that the compiler will optimize an optimal variable allocation inside of the loop, there is SO thread about it that summarizes much better than i:
Basically the results are shown that an optimization such as in the above tutorial is otherwise unnecessary, at least using the non TinyCLR tool chain.
Is there an actual difference we should expect in optimization with TinyCLR? From what i understand the optimization might be valid in native c/++ code, but that’s off topic.