feat: use postcard encoding for all transports that require serialization #114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #108
Not sure about this. I like postcard because of the simplicity, but there is a slight perf decrease:
quinn transport:
main:
RPC seq 24_188 rps
RPC par 204_800 rps
bidi seq 303_453 rps
this branch:
RPC seq 23_582 rps
RPC par 198_579 rps
bidi seq 254_606 rps
hyper transport:
main:
RPC seq 16_149 rps
RPC par 73_340 rps
bidi seq 535_791 rps
this branch:
RPC seq 15_223 rps
RPC par 73_061 rps
bidi seq 531_071 rps
Probably not worth obsessing about though. Pretty sure byte arrays will perform similarly in both cases. And I saw that toko-serde allocates a Bytes for every single item being deserialized. So there is some perf improvement to be had there...