Reading from Announcing .NET Framework 4.6 it seems to imply that RyuJIT is only for .NET 4.6.
Does that means I will need to re-target my applications to .NET 4.6 for RyuJIT to take effect?
Short answer: no.
Long answer: use the debugger to ensure you have the new version. First have a look-see at the runtime directory with Explorer, navigate to C:\Windows\Microsoft.NET\Framework64\v4.0.30319. You'll find the the two jitters there, clrjit.dll
is new jitter based on the Ryujit project and compatjit.dll
is the legacy x64 jitter.
Project > Properties > Debug > tick the "Enable native code debugging option". Use the Build tab and ensure you've removed the jitter forcing, the "Prefer 32-bit" option must be unticked, "Platform target" must be set to AnyCPU. And use the Application tab to pick the framework target.
Use Debug > Step Into to start debugging. Debug > Windows > Modules displays the list of loaded modules. Find the jitter DLLs back in that list, click the "Name" column header to sort by name. If you see compatjit.dll
back then you are using the legacy jitter. Do note that you'll always see clrjit.dll, they both get loaded when the legacy jitter is used.
Using the legacy x64 jitter intentionally requires either the COMPLUS_useLegacyJit environment variable or a useLegacyJit value in the HKLM or HKCU\Software\Microsoft\ .NETFramework registry key or an app.exe.config file entry:
<runtime>
<useLegacyJit enabled="1"/>
</runtime>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With