Do I really need to care where it's possible to emit .s
instructions? Or will it only affect the size but the real performance will be the same?
The generated dll is going to be used also on AOT platforms. Will the resulting AOT-ed dll be the same for IL with .s
and without?
I mean br.s
, ldloca.s
, etc..
It depends. The main purpose of .s
(and literal-containg opcodes like ldc.i4.1
) are just to decrease the size of the code, and the advantage of decreasing the size of a method is to make it possible to inline the method when generating native code from CIL of the calling method (the limit for x86 jitter is 32 bytes of IL). So in this case, short instructions can increase the performance of the application, if they are used in a inline-candidate method.
Otherwise, as it is not the CIL that's executed, the machine code generated by both of short and normal opcodes should be the same (and also optimized, when possible) native code.
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