-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Description
We are using memcmp a lot, to do comparisons of pieces of data inside mmap file.
Because of the cost of p/invoke, we wrote our own memory comparison function and only shell to memcmp if the size is large enough to be worth it.
I would rather be able to directly call memcmp without paying the pinvoke costs.
Calls to memset and memcpy are already exposed via Unsafe.InitBlock and Unsafe.CopyBlock, respectively.
See:
https://github.com/dotnet/corefx/blob/64c6d9fe5409be14bdc3609d73ffb3fea1f35797/src/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.il#L162
What would be the process of adding a similar functionality for exposing memcmp ?
Reactions are currently unavailable