Reputation: 12102
Posts like http://aakinshin.net/en/blog/dotnet/ryujit-ctp5-and-loop-unrolling/ show the assembly code created by the JIT compiler. How can I get my hands on genereted assembly from a .NET program?
Upvotes: 3
Views: 220
Reputation: 941515
That was simply copied from the Visual Studio debugger window. You just have to change a few options so you can debug optimized code, loop unrolling does not occur otherwise:
Beware that you must write "substantial" code that has sufficient side-effects so it doesn't get optimized away completely. A Console.Write() can help for example. If you have trouble correlating the source code with the machine code then you might want to first do this for the Debug build.
Upvotes: 4