You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From time to time, I learn of "new" (in the sense of not known to me) optimization that RyuJIT or the LegacyJIT can take.
From a recent example, I learned, for instance, that:
For BCL ValueType primitives byte, sbyte, ushort, short, uint, int, ulong, long, IntPtr, UIntPtr, Guid cast via object to the type and use .Equals directly them directly; then rely on the Jit to elide the boxing - meaning the mostly completely inline (e.g. Guid doesn't; though isn't a virtual call)
Or in other words, that in this type of code-construct:
As someone attempting to write correct yet readable code, this sort of information, of what the JIT can and can't do, is not available to the best of my knowledge.
Is there a way the a definitive list could be made that describes exactly which optimizations the JIT can make and under what circumstances?
The text was updated successfully, but these errors were encountered:
From time to time, I learn of "new" (in the sense of not known to me) optimization that RyuJIT or the LegacyJIT can take.
From a recent example, I learned, for instance, that:
Or in other words, that in this type of code-construct:
The JIT can omit the boxing all together.
As someone attempting to write correct yet readable code, this sort of information, of what the JIT can and can't do, is not available to the best of my knowledge.
Is there a way the a definitive list could be made that describes exactly which optimizations the JIT can make and under what circumstances?
The text was updated successfully, but these errors were encountered: