3 ms·
The JIT optimizes them away: > The IsSupported checks are treated as runtime constants by the JIT (when optimizations are enabled) and so you do not need to cr
by legulere 7y ago
The JIT optimizes them away:
> The IsSupported checks are treated as runtime constants by the JIT (when optimizations are enabled) and so you do not need to cross-compile to support multiple different ISAs, platforms, or architectures. Instead, you just write your code using if-statements and the unused code paths (any code path which is not executed, due to the condition for the branch being false or an earlier branch being taken instead) are dropped from the generated code (the native assembly code generated by the JIT at runtime).
https://devblogs.microsoft.com/dotnet/hardware-intrinsics-in-net-core/ https://devblogs.microsoft.com/dotnet/hardware-intrinsics-in...