Skip to content
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

feat: use postcard encoding for all transports that require serialization #114

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rklaehn
Copy link
Collaborator

@rklaehn rklaehn commented Nov 14, 2024

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...

@rklaehn rklaehn changed the title Use postcard encoding for quinn transport feat: use postcard encoding for all transports that require serialization Nov 14, 2024
@rklaehn rklaehn requested a review from fogodev November 14, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants