-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
New Span-based serialization logic (followup for #7351) #7576
New Span-based serialization logic (followup for #7351) #7576
Conversation
Is |
I still need to expose the API and add tests, but vast majority of the internal implementation is already there. |
feb0f30
to
90d4969
Compare
@gerben-s Can you review please? |
The new benchmarks (as of commit 4f0afc7) are here: https://gist.github.com/jtattermusch/c9e5389a398f7c79710a9bf12aee215f |
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.
Yes this looks good to me
Is there a timeline, for when the nuget package for C# will be released? Eagerly waiting to be able to use Span with the serialization/deserialization methods you have developed :) |
If everything goes as planned, it should be available over the course of the next few weeks. |
…ffer_serialization New Span-based serialization logic (followup for protocolbuffers#7351)
Span-based parsing has been added by #7351 , this PR adds the serialization counterpart, which allows serialization to
IBufferWriter
(which is much more GC friendly).Based on #7490
Update 2020-06-29:
The new benchmarks (as of commit 4f0afc7) are here: https://gist.github.com/jtattermusch/c9e5389a398f7c79710a9bf12aee215f
For both writing primitives and writing messages the performance is comparable (there are some significant improvement and some slight regressions) to the original state, which seems good enough (as this PR offers an API to serialize directly into a Span and/or to IBufferWriter, which are modern APIs allowing for much better GC efficiency).