Repository navigation
Replace sizeof(UIntPtr) with UIntPtr.Size in condition - #242
marek-safar wants to merge 1 commit into
Conversation
for easier ILLinker detection (his is more stylistic change than noticeable size reduction)
|
|
|
Since this is CoreLib, we can also just put this under |
That's a good idea and I cannot think of scenario where we'd need to differentiate them.
You mean it's slightly more efficient in terms of IL size of performance? IL size of the call seems smaller than sizeof so the call syntax should be prefered from this perspective. For the performance impact, we could add AggressiveInlining to Size property or it that not enough for RyuJIT?
Sure but I'd prefer to have a pattern we recommend to library authors. |
The JIT is not always able to get rid of all clutter from inlining. For example, https://github.com/dotnet/coreclr/issues/27935 |
Some library authors may choose to do multiple builds, like we do for CoreLib. |
|
ok, closing |
for easier ILLinker detection
(his is more stylistic change than noticeable size reduction)