-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to ByteString
for copying to/from Memory
and Span
#6026
Add support to ByteString
for copying to/from Memory
and Span
#6026
Conversation
Should we consider going away from |
This is more what I was thinking too - moving away from |
I don't think we will get any improvement switching over to Memory, even microsoft ReadOnlySequence still uses ArraySegment underneath. |
being able to work with new native APIs in .NET 6 without copying is a big improvement: https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.receiveasync?view=net-6.0#system-net-sockets-socket-receiveasync(system-memory((system-byte))-system-net-sockets-socketflags-system-threading-cancellationtoken) |
Hmmm... true, as long as we ditch dotnetty |
Long term I think it's probably worth the payoff to just move to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is small PR and doesn't do much to change the internals of |
Changes
Add
CopyTo
andCopyFrom
Memory
andSpan
support toByteString