-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Mark MemoryMarshal.Cast methods for aggressive inlining #16654
Conversation
Inlining doesn't streamline the cast logic any, but it facilitates caller struct promotion which can substantially boost perf. See discussion in dotnet/corefx#27485.
@ianhays PTAL |
Hmm, I really should improve that cast code to avoid bloating the caller... |
What other Span APIs would this be applicable to? |
If you have a So in the case of |
Should we mark GetReference as AggressiveInlining? For cases like these: |
GetReference is small enough to be naturally inlinable. You do not have to force it. |
Inlining doesn't streamline the cast logic any, but it facilitates caller struct promotion which can substantially boost perf. See discussion in dotnet/corefx#27485.
Inlining doesn't streamline the cast logic any, but it facilitates
caller struct promotion which can substantially boost perf.
See discussion in dotnet/corefx#27485.