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
Consider refactoring usage of Marshal.Read* and Marshal.Write* with either raw pointers or Unsafe.Read & Unsafe.Write.
For legacy reasons, the Marshal classes seem to include exception handling for bad addresses; and in .NET the inclusion of exception handling will prevent your code from being inlined.
Consider refactoring usage of
Marshal.Read*
andMarshal.Write*
with either raw pointers orUnsafe.Read
&Unsafe.Write
.For legacy reasons, the Marshal classes seem to include exception handling for bad addresses; and in .NET the inclusion of exception handling will prevent your code from being inlined.
SharpLab sample to demonstrate.
SpiralNeo/Info.SpiralFramework.Neo/HookDelegates.cs
Line 15 in 75a1c55
Marshalling arrays causes unnecessary heap allocations, consider using raw pointer + count, and then creating
Span<T>
.The text was updated successfully, but these errors were encountered: